'DOC_ID
'DOC_CAT_ID
'DOC_SUB_CAT_ID
'DOC
'DOC_TYPE
'DOC_DATE
'DOC_VERSION
'DOC_NAME
'DOC_EXT
'DOC_AUTHOR
'DOC_SUBJECT
'DOC_KEYWORDS
'DOC_TEXT
'If thisFile.Extension.ToUpper = ".DOC" Or thisFile.Extension.ToUpper = ".PPT" Or thisFile.Extension.ToUpper = ".XLS" _
'        Or thisFile.Extension.ToUpper = ".CSV" Then
'    dso = New DSOFile.OleDocumentProperties
'    dso.Open(thisFile.FullName, True, DSOFile.dsoFileOpenOptions.dsoOptionOpenReadOnlyIfNoWriteAccess)
'    If dso.OleDocumentType = Nothing Then
'        CDATA.Rs.Fields("DOC_TYPE").Value = dso.ProgID
'    Else
'        CDATA.Rs.Fields("DOC_TYPE").Value = dso.OleDocumentType.ToString
'    End If
'    dso.Close()
'    dso = Nothing

Imports System.IO
Imports DSOFile
Imports pdflib
Imports System.Collections


Public Class Documents
    Dim lstSort As ListViewItemSorterClass
    Private m_SortingColumn As ColumnHeader
    Private isRunningXPOrLater As Boolean = _
        OSFeature.Feature.IsPresent(OSFeature.Themes)
    Private groupTables() As Hashtable
    Private groupColumn As Integer = 0
    Dim column As Integer = 0
    Private oSorter As ListViewItemSorterClass
    Dim CurrentColumnIndex As Integer = 1
    Public Shared TblFileTemp As DsTempList.TempListDataTable
    Friend WithEvents NppRepositories As Ascend.Windows.Forms.NavigationPanePage
    Friend WithEvents VirtualMnu As Ascend.Windows.Forms.NavigationPane
    Friend WithEvents NppComputer As Ascend.Windows.Forms.NavigationPanePage
   

#Region "Clases Privadas"
    
    Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container
        Dim ListViewGroup1 As System.Windows.Forms.ListViewGroup = New System.Windows.Forms.ListViewGroup("Name", System.Windows.Forms.HorizontalAlignment.Left)
        Dim ListViewGroup2 As System.Windows.Forms.ListViewGroup = New System.Windows.Forms.ListViewGroup("Size", System.Windows.Forms.HorizontalAlignment.Left)
        Dim ListViewGroup3 As System.Windows.Forms.ListViewGroup = New System.Windows.Forms.ListViewGroup("Type", System.Windows.Forms.HorizontalAlignment.Left)
        Dim ListViewGroup4 As System.Windows.Forms.ListViewGroup = New System.Windows.Forms.ListViewGroup("Modified", System.Windows.Forms.HorizontalAlignment.Left)
        Dim ListViewGroup5 As System.Windows.Forms.ListViewGroup = New System.Windows.Forms.ListViewGroup("FullPath", System.Windows.Forms.HorizontalAlignment.Left)
        Dim ListViewItem1 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"My Documents", "", "System Folder", "6/16/2008 8:29:17 AM", ""}, 10)
        Dim ListViewItem2 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"My Computer", "", "System Folder", "", ""}, 11)
        Dim ListViewItem3 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"My Network Places", "", "System Folder", "", ""}, 12)
        Dim ListViewItem4 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"My Private Folder", "", "System Folder", "4/11/2008 9:27:20 AM", ""}, 13)
        Dim ListViewItem5 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"Recycle Bin", "", "System Folder", "", ""}, 14)
        Dim ListViewItem6 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"accordion", "", "File Folder", "6/3/2008 2:45:42 PM", "C:\Documents and Settings\u0123800\Desktop\accordion"}, 6)
        Dim ListViewItem7 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"apup", "", "File Folder", "4/2/2008 3:32:08 PM", "C:\Documents and Settings\u0123800\Desktop\apup"}, 6)
        Dim ListViewItem8 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"Avast", "", "File Folder", "5/15/2008 6:39:41 PM", "C:\Documents and Settings\u0123800\Desktop\Avast"}, 6)
        Dim ListViewItem9 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"Backup", "", "File Folder", "5/27/2008 12:46:45 PM", "C:\Documents and Settings\u0123800\Desktop\Backup"}, 6)
        Dim ListViewItem10 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"captivework", "", "File Folder", "1/14/2008 12:13:18 PM", "C:\Documents and Settings\u0123800\Desktop\captivework"}, 6)
        Dim ListViewItem11 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"crmtool", "", "File Folder", "5/6/2008 4:25:42 PM", "C:\Documents and Settings\u0123800\Desktop\crmtool"}, 6)
        Dim ListViewItem12 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"DataControls", "", "File Folder", "5/15/2008 10:25:04 AM", "C:\Documents and Settings\u0123800\Desktop\DataControls"}, 6)
        Dim ListViewItem13 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"dbEntry", "", "File Folder", "4/28/2008 3:11:40 PM", "C:\Documents and Settings\u0123800\Desktop\dbEntry"}, 6)
        Dim ListViewItem14 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"DIGI_DOC", "", "File Folder", "3/7/2008 10:47:24 AM", "C:\Documents and Settings\u0123800\Desktop\DIGI_DOC"}, 6)
        Dim ListViewItem15 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"DIGI_DOC_2008", "", "File Folder", "3/14/2008 2:32:10 PM", "C:\Documents and Settings\u0123800\Desktop\DIGI_DOC_2008"}, 6)
        Dim ListViewItem16 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"DIGI_DOC_SETUP", "", "File Folder", "3/7/2008 8:43:01 AM", "C:\Documents and Settings\u0123800\Desktop\DIGI_DOC_SETUP"}, 6)
        Dim ListViewItem17 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"DIGIDOC_CONTROLS", "", "File Folder", "6/10/2008 4:35:58 PM", "C:\Documents and Settings\u0123800\Desktop\DIGIDOC_CONTROLS"}, 6)
        Dim ListViewItem18 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"digisystem", "", "File Folder", "6/3/2008 11:15:25 AM", "C:\Documents and Settings\u0123800\Desktop\digisystem"}, 6)
        Dim ListViewItem19 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"DotNetOpenMail-0.5.8b-bin", "", "File Folder", "4/10/2008 1:02:46 PM", "C:\Documents and Settings\u0123800\Desktop\DotNetOpenMail-0.5.8b-bin"}, 6)
        Dim ListViewItem20 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"Drawing_sh19495211192005", "", "File Folder", "6/8/2008 11:55:22 AM", "C:\Documents and Settings\u0123800\Desktop\Drawing_sh19495211192005"}, 6)
        Dim ListViewItem21 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"easyinstall", "", "File Folder", "5/6/2008 4:20:35 PM", "C:\Documents and Settings\u0123800\Desktop\easyinstall"}, 6)
        Dim ListViewItem22 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"Eclipse", "", "File Folder", "3/4/2008 8:43:07 AM", "C:\Documents and Settings\u0123800\Desktop\Eclipse"}, 6)
        Dim ListViewItem23 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"Ejercicio36", "", "File Folder", "6/4/2008 9:09:16 PM", "C:\Documents and Settings\u0123800\Desktop\Ejercicio36"}, 6)
        Dim ListViewItem24 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"Ejercisio 30", "", "File Folder", "6/8/2008 12:31:50 PM", "C:\Documents and Settings\u0123800\Desktop\Ejercisio 30"}, 6)
        Dim ListViewItem25 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"epesi-1.0.0rc1", "", "File Folder", "5/6/2008 3:41:22 PM", "C:\Documents and Settings\u0123800\Desktop\epesi-1.0.0rc1"}, 6)
        Dim ListViewItem26 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"ExtJSEntenderControls", "", "File Folder", "4/27/2008 7:20:52 PM", "C:\Documents and Settings\u0123800\Desktop\ExtJSEntenderControls"}, 6)
        Dim ListViewItem27 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"FLOODRENEWAL", "", "File Folder", "5/28/2008 10:18:51 AM", "C:\Documents and Settings\u0123800\Desktop\FLOODRENEWAL"}, 6)
        Dim ListViewItem28 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"Graph", "", "File Folder", "4/29/2008 11:49:57 AM", "C:\Documents and Settings\u0123800\Desktop\Graph"}, 6)
        Dim ListViewItem29 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"MasterDetailGridExp", "", "File Folder", "4/16/2008 10:44:00 AM", "C:\Documents and Settings\u0123800\Desktop\MasterDetailGridExp"}, 6)
        Dim ListViewItem30 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"mikescroll", "", "File Folder", "6/6/2008 2:55:05 PM", "C:\Documents and Settings\u0123800\Desktop\mikescroll"}, 6)
        Dim ListViewItem31 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"MiniTools", "", "File Folder", "4/17/2008 11:30:11 AM", "C:\Documents and Settings\u0123800\Desktop\MiniTools"}, 6)
        Dim ListViewItem32 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"OpenDBDiff", "", "File Folder", "5/1/2008 1:19:02 PM", "C:\Documents and Settings\u0123800\Desktop\OpenDBDiff"}, 6)
        Dim ListViewItem33 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"OpenPDF09122007", "", "File Folder", "6/5/2008 2:53:01 PM", "C:\Documents and Settings\u0123800\Desktop\OpenPDF09122007"}, 6)
        Dim ListViewItem34 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"openproj-1.1", "", "File Folder", "5/6/2008 1:53:40 PM", "C:\Documents and Settings\u0123800\Desktop\openproj-1.1"}, 6)
        Dim ListViewItem35 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"PACBASE", "", "File Folder", "4/3/2008 4:32:50 PM", "C:\Documents and Settings\u0123800\Desktop\PACBASE"}, 6)
        Dim ListViewItem36 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"pdflib", "", "File Folder", "5/29/2008 1:09:11 PM", "C:\Documents and Settings\u0123800\Desktop\pdflib"}, 6)
        Dim ListViewItem37 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"PokerTHPortable", "", "File Folder", "11/16/2007 4:25:39 PM", "C:\Documents and Settings\u0123800\Desktop\PokerTHPortable"}, 6)
        Dim ListViewItem38 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"PrintScreens", "", "File Folder", "6/11/2008 11:00:19 AM", "C:\Documents and Settings\u0123800\Desktop\PrintScreens"}, 6)
        Dim ListViewItem39 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"PROGRAM (LAPTOP)", "", "File Folder", "4/28/2008 8:42:24 AM", "C:\Documents and Settings\u0123800\Desktop\PROGRAM (LAPTOP)"}, 6)
        Dim ListViewItem40 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"PROGRAMS", "", "File Folder", "5/29/2008 11:38:18 AM", "C:\Documents and Settings\u0123800\Desktop\PROGRAMS"}, 6)
        Dim ListViewItem41 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"SDXGrid", "", "File Folder", "2/28/2008 4:23:17 PM", "C:\Documents and Settings\u0123800\Desktop\SDXGrid"}, 6)
        Dim ListViewItem42 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"ServerCodeFromClientSide", "", "File Folder", "4/1/2008 2:36:31 PM", "C:\Documents and Settings\u0123800\Desktop\ServerCodeFromClientSide"}, 6)
        Dim ListViewItem43 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"Shape_Cont1102157242002", "", "File Folder", "6/8/2008 12:12:25 PM", "C:\Documents and Settings\u0123800\Desktop\Shape_Cont1102157242002"}, 6)
        Dim ListViewItem44 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"SQLDBBackupUtility", "", "File Folder", "5/27/2008 12:24:34 PM", "C:\Documents and Settings\u0123800\Desktop\SQLDBBackupUtility"}, 6)
        Dim ListViewItem45 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"Support(No Borrar)", "", "File Folder", "6/12/2008 8:46:34 AM", "C:\Documents and Settings\u0123800\Desktop\Support(No Borrar)"}, 6)
        Dim ListViewItem46 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"TimeRep102", "", "File Folder", "5/6/2008 3:40:01 PM", "C:\Documents and Settings\u0123800\Desktop\TimeRep102"}, 6)
        Dim ListViewItem47 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"vault", "", "File Folder", "8/13/2007 10:53:17 AM", "C:\Documents and Settings\u0123800\Desktop\vault"}, 6)
        Dim ListViewItem48 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"Viewsat", "", "File Folder", "1/4/2008 8:53:08 AM", "C:\Documents and Settings\u0123800\Desktop\Viewsat"}, 6)
        Dim ListViewItem49 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"VisualWebGui-Gizmox", "", "File Folder", "5/24/2008 10:11:56 AM", "C:\Documents and Settings\u0123800\Desktop\VisualWebGui-Gizmox"}, 6)
        Dim ListViewItem50 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"YYControls", "", "File Folder", "4/28/2008 2:16:01 PM", "C:\Documents and Settings\u0123800\Desktop\YYControls"}, 6)
        Dim ListViewItem51 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"Internet Explorer", "", "System Folder", "", ""}, 16)
        Dim ListViewItem52 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"ArKvnn_-_B08_by_1000VA.rar", "66,017 KB", "WinRAR archive", "6/16/2008 8:31:38 AM", "C:\Documents and Settings\u0123800\Desktop\ArKvnn_-_B08_by_1000VA.rar"}, 17)
        Dim ListViewItem53 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"cashflow.pdf", "151 KB", "Adobe Acrobat Document", "6/16/2008 10:52:57 AM", "C:\Documents and Settings\u0123800\Desktop\cashflow.pdf"}, 19)
        Dim ListViewItem54 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"CashflowMatrix.xls", "50 KB", "Microsoft Excel Worksheet", "6/16/2008 10:22:46 AM", "C:\Documents and Settings\u0123800\Desktop\CashflowMatrix.xls"}, 18)
        Dim ListViewItem55 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"IPP 10019.pdf", "655 KB", "Adobe Acrobat Document", "6/13/2008 8:34:00 AM", "C:\Documents and Settings\u0123800\Desktop\IPP 10019.pdf"}, 19)
        Dim ListViewItem56 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"Ir8089-08-Cx.rar", "96,996 KB", "WinRAR archive", "6/17/2008 10:32:00 AM", "C:\Documents and Settings\u0123800\Desktop\Ir8089-08-Cx.rar"}, 17)
        Dim ListViewItem57 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"openproj-1.2.msi", "6,602 KB", "Windows Installer Package", "6/16/2008 8:22:04 AM", "C:\Documents and Settings\u0123800\Desktop\openproj-1.2.msi"}, 20)
        Dim ListViewItem58 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"Statement of cash flows.xls", "20 KB", "Microsoft Excel Worksheet", "6/16/2008 10:28:05 AM", "C:\Documents and Settings\u0123800\Desktop\Statement of cash flows.xls"}, 18)
        Dim ListViewItem59 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem(New String() {"VirtualDeskInstall.zip", "6,590 KB", "WinRAR ZIP archive", "6/12/2008 4:44:52 PM", "C:\Documents and Settings\u0123800\Desktop\VirtualDeskInstall.zip"}, 17)
        Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Documents))
        Me.VirtualMnu = New Ascend.Windows.Forms.NavigationPane
        Me.NppComputer = New Ascend.Windows.Forms.NavigationPanePage
        Me.myDtView = New DirectoryTreeview.DirectoryTreeview
        Me.lstvMyComputer = New System.Windows.Forms.ListView
        Me.cmnuFileOptions = New System.Windows.Forms.ContextMenuStrip(Me.components)
        Me.AddToTemporaryListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.GoToTemporaryListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.ClearTemporaryListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.NppRepositories = New Ascend.Windows.Forms.NavigationPanePage
        Me.TreeViewRepository = New System.Windows.Forms.TreeView
        Me.TreeViewIcons = New System.Windows.Forms.ImageList(Me.components)
        Me.pnlMyCompter = New System.Windows.Forms.Panel
        Me.ThemeToolStrip1 = New BurtonSoftware.ThemeKit.ThemeToolStrip(Me.components)
        Me.ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator
        Me.ToolStripDropDownButton3 = New System.Windows.Forms.ToolStripDropDownButton
        Me.AddSelectFileToListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.EditListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.ClearListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator
        Me.ToolStripDropDownButton1 = New System.Windows.Forms.ToolStripDropDownButton
        Me.DetailToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.ListToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.SmallIconsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.LargeIconsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.TitleToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.pnlRepository = New System.Windows.Forms.Panel
        Me.dgDocuments = New System.Windows.Forms.DataGridView
        Me.DOCIDDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.DOCNAMEDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.DOCCATTYPEDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.DOCSUBCATTYPEDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.DOCAUTHORDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.DOCDATEDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.DOCTYPEDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.DOCVERSIONDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.DOCSUBJECTDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.DOCKEYWORDSDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.VDOCUMENTSBindingSource = New System.Windows.Forms.BindingSource(Me.components)
        Me.DsTempList = New VirtualDesk.DsTempList
        Me.Panel1 = New System.Windows.Forms.Panel
        Me.btnClearFilter = New BurtonSoftware.ThemeKit.ThemeButton
        Me.btnSearch = New BurtonSoftware.ThemeKit.ThemeButton
        Me.lblColumn = New System.Windows.Forms.Label
        Me.txtSearch = New System.Windows.Forms.TextBox
        Me.Label9 = New System.Windows.Forms.Label
        Me.GroupBox1 = New System.Windows.Forms.GroupBox
        Me.btn_EditDocInf = New BurtonSoftware.ThemeKit.ThemeButton
        Me.GroupBox3 = New System.Windows.Forms.GroupBox
        Me.DGCOMMENTS = New System.Windows.Forms.DataGridView
        Me.COMMENT_ID = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.COMMENTDATEDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.COMMENTTITLEDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.COMMENTDESCDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.TBLDOCCOMMENTBindingSource = New System.Windows.Forms.BindingSource(Me.components)
        Me.GroupBox2 = New System.Windows.Forms.GroupBox
        Me.btnDuplicate = New BurtonSoftware.ThemeKit.ThemeButton
        Me.btnCopy = New BurtonSoftware.ThemeKit.ThemeButton
        Me.ThemeButton3 = New BurtonSoftware.ThemeKit.ThemeButton
        Me.btnViewDocument = New BurtonSoftware.ThemeKit.ThemeButton
        Me.btn_addComment = New BurtonSoftware.ThemeKit.ThemeButton
        Me.btn_editDoc = New BurtonSoftware.ThemeKit.ThemeButton
        Me.TextBox8 = New System.Windows.Forms.TextBox
        Me.TextBox7 = New System.Windows.Forms.TextBox
        Me.TextBox6 = New System.Windows.Forms.TextBox
        Me.TextBox5 = New System.Windows.Forms.TextBox
        Me.TextBox4 = New System.Windows.Forms.TextBox
        Me.TextBox3 = New System.Windows.Forms.TextBox
        Me.TextBox2 = New System.Windows.Forms.TextBox
        Me.TextBox1 = New System.Windows.Forms.TextBox
        Me.Label8 = New System.Windows.Forms.Label
        Me.Label7 = New System.Windows.Forms.Label
        Me.Label6 = New System.Windows.Forms.Label
        Me.Label5 = New System.Windows.Forms.Label
        Me.Label4 = New System.Windows.Forms.Label
        Me.Label3 = New System.Windows.Forms.Label
        Me.Label2 = New System.Windows.Forms.Label
        Me.Label1 = New System.Windows.Forms.Label
        Me.cmsCkeckin = New System.Windows.Forms.ContextMenuStrip(Me.components)
        Me.LoadToRepositoryMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.CancelEditingMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.GetLastMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.TBLDOCCATBindingSource = New System.Windows.Forms.BindingSource(Me.components)
        Me.TBLDOCSUBCATBindingSource = New System.Windows.Forms.BindingSource(Me.components)
        Me.BindingSource1 = New System.Windows.Forms.BindingSource(Me.components)
        Me.TbL_DOC_CATTableAdapter1 = New VirtualDesk.DsTempListTableAdapters.TBL_DOC_CATTableAdapter
        Me.TbL_DOC_SUB_CATTableAdapter1 = New VirtualDesk.DsTempListTableAdapters.TBL_DOC_SUB_CATTableAdapter
        Me.V_DOCUMENTSTableAdapter = New VirtualDesk.DsTempListTableAdapters.V_DOCUMENTSTableAdapter
        Me.TBL_DOC_COMMENTTableAdapter = New VirtualDesk.DsTempListTableAdapters.TBL_DOC_COMMENTTableAdapter
        Me.TbL_DOCTableAdapter1 = New VirtualDesk.DsTempListTableAdapters.TBL_DOCTableAdapter
        Me.VirtualMnu.SuspendLayout()
        Me.NppComputer.SuspendLayout()
        Me.cmnuFileOptions.SuspendLayout()
        Me.NppRepositories.SuspendLayout()
        Me.pnlMyCompter.SuspendLayout()
        Me.ThemeToolStrip1.SuspendLayout()
        Me.pnlRepository.SuspendLayout()
        CType(Me.dgDocuments, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.VDOCUMENTSBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.DsTempList, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.Panel1.SuspendLayout()
        Me.GroupBox1.SuspendLayout()
        Me.GroupBox3.SuspendLayout()
        CType(Me.DGCOMMENTS, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.TBLDOCCOMMENTBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.GroupBox2.SuspendLayout()
        Me.cmsCkeckin.SuspendLayout()
        CType(Me.TBLDOCCATBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.TBLDOCSUBCATBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.BindingSource1, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'VirtualMnu
        '
        Me.VirtualMnu.AntiAlias = True
        Me.VirtualMnu.ButtonActiveGradientHighColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(225, Byte), Integer), CType(CType(155, Byte), Integer))
        Me.VirtualMnu.ButtonActiveGradientLowColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(165, Byte), Integer), CType(CType(78, Byte), Integer))
        Me.VirtualMnu.ButtonBorderColor = System.Drawing.SystemColors.MenuHighlight
        Me.VirtualMnu.ButtonFont = New System.Drawing.Font("Times New Roman", 8.25!, System.Drawing.FontStyle.Bold)
        Me.VirtualMnu.ButtonForeColor = System.Drawing.SystemColors.ControlText
        Me.VirtualMnu.ButtonGradientHighColor = System.Drawing.SystemColors.ButtonHighlight
        Me.VirtualMnu.ButtonGradientLowColor = System.Drawing.SystemColors.GradientActiveCaption
        Me.VirtualMnu.ButtonHighlightGradientHighColor = System.Drawing.Color.White
        Me.VirtualMnu.ButtonHighlightGradientLowColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(165, Byte), Integer), CType(CType(78, Byte), Integer))
        Me.VirtualMnu.CaptionBorderColor = System.Drawing.SystemColors.ActiveCaption
        Me.VirtualMnu.CaptionFont = New System.Drawing.Font("Times New Roman", 11.25!, System.Drawing.FontStyle.Bold)
        Me.VirtualMnu.CaptionForeColor = System.Drawing.SystemColors.ActiveCaptionText
        Me.VirtualMnu.CaptionGradientHighColor = System.Drawing.SystemColors.GradientActiveCaption
        Me.VirtualMnu.CaptionGradientLowColor = System.Drawing.SystemColors.ActiveCaption
        Me.VirtualMnu.Controls.Add(Me.NppRepositories)
        Me.VirtualMnu.Controls.Add(Me.NppComputer)
        Me.VirtualMnu.Cursor = System.Windows.Forms.Cursors.Default
        Me.VirtualMnu.Dock = System.Windows.Forms.DockStyle.Left
        Me.VirtualMnu.Font = New System.Drawing.Font("Times New Roman", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.VirtualMnu.FooterGradientHighColor = System.Drawing.SystemColors.ButtonHighlight
        Me.VirtualMnu.FooterGradientLowColor = System.Drawing.SystemColors.GradientActiveCaption
        Me.VirtualMnu.FooterHeight = 30
        Me.VirtualMnu.FooterHighlightGradientHighColor = System.Drawing.Color.White
        Me.VirtualMnu.FooterHighlightGradientLowColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(165, Byte), Integer), CType(CType(78, Byte), Integer))
        Me.VirtualMnu.Location = New System.Drawing.Point(0, 0)
        Me.VirtualMnu.Name = "VirtualMnu"
        Me.VirtualMnu.NavigationPages.AddRange(New Ascend.Windows.Forms.NavigationPanePage() {Me.NppRepositories, Me.NppComputer})
        Me.VirtualMnu.Size = New System.Drawing.Size(245, 647)
        Me.VirtualMnu.TabIndex = 0
        Me.VirtualMnu.VisibleButtonCount = 2
        '
        'NppComputer
        '
        Me.NppComputer.ActiveGradientHighColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(225, Byte), Integer), CType(CType(155, Byte), Integer))
        Me.NppComputer.ActiveGradientLowColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(165, Byte), Integer), CType(CType(78, Byte), Integer))
        Me.NppComputer.AutoScroll = True
        Me.NppComputer.ButtonFont = New System.Drawing.Font("Times New Roman", 8.25!, System.Drawing.FontStyle.Bold)
        Me.NppComputer.ButtonForeColor = System.Drawing.SystemColors.ControlText
        Me.NppComputer.Controls.Add(Me.myDtView)
        Me.NppComputer.GradientHighColor = System.Drawing.SystemColors.ButtonHighlight
        Me.NppComputer.GradientLowColor = System.Drawing.SystemColors.GradientActiveCaption
        Me.NppComputer.HighlightGradientHighColor = System.Drawing.Color.White
        Me.NppComputer.HighlightGradientLowColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(165, Byte), Integer), CType(CType(78, Byte), Integer))
        Me.NppComputer.Image = Nothing
        Me.NppComputer.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
        Me.NppComputer.ImageFooter = Nothing
        Me.NppComputer.ImageIndex = -1
        Me.NppComputer.ImageIndexFooter = -1
        Me.NppComputer.ImageKey = ""
        Me.NppComputer.ImageKeyFooter = ""
        Me.NppComputer.ImageList = Nothing
        Me.NppComputer.ImageListFooter = Nothing
        Me.NppComputer.Key = "MyComputer"
        Me.NppComputer.Location = New System.Drawing.Point(1, 27)
        Me.NppComputer.Name = "NppComputer"
        Me.NppComputer.Size = New System.Drawing.Size(243, 518)
        Me.NppComputer.TabIndex = 1
        Me.NppComputer.Text = "My Computer"
        Me.NppComputer.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
        Me.NppComputer.ToolTipText = Nothing
        '
        'myDtView
        '
        Me.myDtView.AllowDrop = True
        Me.myDtView.ChildListView = Me.lstvMyComputer
        Me.myDtView.CollapseRoot = False
        Me.myDtView.Cursor = System.Windows.Forms.Cursors.Default
        Me.myDtView.Dock = System.Windows.Forms.DockStyle.Fill
        Me.myDtView.InitialDirectory = DirectoryTreeview.DirectoryTreeview.InitialDir.Desktop
        Me.myDtView.InitialView = DirectoryTreeview.DirectoryTreeview.ViewType.Details
        Me.myDtView.Location = New System.Drawing.Point(0, 0)
        Me.myDtView.Name = "myDtView"
        Me.myDtView.Size = New System.Drawing.Size(243, 518)
        Me.myDtView.StatusLabel = Nothing
        Me.myDtView.TabIndex = 0
        '
        'lstvMyComputer
        '
        Me.lstvMyComputer.AllowColumnReorder = True
        Me.lstvMyComputer.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.lstvMyComputer.ContextMenuStrip = Me.cmnuFileOptions
        Me.lstvMyComputer.Dock = System.Windows.Forms.DockStyle.Fill
        Me.lstvMyComputer.FullRowSelect = True
        ListViewGroup1.Header = "Name"
        ListViewGroup1.Name = "Name"
        ListViewGroup1.Tag = "Name"
        ListViewGroup2.Header = "Size"
        ListViewGroup2.Name = "Size"
        ListViewGroup2.Tag = "Size"
        ListViewGroup3.Header = "Type"
        ListViewGroup3.Name = "Type"
        ListViewGroup3.Tag = "Type"
        ListViewGroup4.Header = "Modified"
        ListViewGroup4.Name = "Modified"
        ListViewGroup4.Tag = "Modified"
        ListViewGroup5.Header = "FullPath"
        ListViewGroup5.Name = "FullPath"
        ListViewGroup5.Tag = "FullPath"
        Me.lstvMyComputer.Groups.AddRange(New System.Windows.Forms.ListViewGroup() {ListViewGroup1, ListViewGroup2, ListViewGroup3, ListViewGroup4, ListViewGroup5})
        Me.lstvMyComputer.Items.AddRange(New System.Windows.Forms.ListViewItem() {ListViewItem1, ListViewItem2, ListViewItem3, ListViewItem4, ListViewItem5, ListViewItem6, ListViewItem7, ListViewItem8, ListViewItem9, ListViewItem10, ListViewItem11, ListViewItem12, ListViewItem13, ListViewItem14, ListViewItem15, ListViewItem16, ListViewItem17, ListViewItem18, ListViewItem19, ListViewItem20, ListViewItem21, ListViewItem22, ListViewItem23, ListViewItem24, ListViewItem25, ListViewItem26, ListViewItem27, ListViewItem28, ListViewItem29, ListViewItem30, ListViewItem31, ListViewItem32, ListViewItem33, ListViewItem34, ListViewItem35, ListViewItem36, ListViewItem37, ListViewItem38, ListViewItem39, ListViewItem40, ListViewItem41, ListViewItem42, ListViewItem43, ListViewItem44, ListViewItem45, ListViewItem46, ListViewItem47, ListViewItem48, ListViewItem49, ListViewItem50, ListViewItem51, ListViewItem52, ListViewItem53, ListViewItem54, ListViewItem55, ListViewItem56, ListViewItem57, ListViewItem58, ListViewItem59})
        Me.lstvMyComputer.Location = New System.Drawing.Point(0, 25)
        Me.lstvMyComputer.Name = "lstvMyComputer"
        Me.lstvMyComputer.Size = New System.Drawing.Size(763, 622)
        Me.lstvMyComputer.TabIndex = 0
        Me.lstvMyComputer.UseCompatibleStateImageBehavior = False
        Me.lstvMyComputer.View = System.Windows.Forms.View.Details
        '
        'cmnuFileOptions
        '
        Me.cmnuFileOptions.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.AddToTemporaryListToolStripMenuItem, Me.GoToTemporaryListToolStripMenuItem, Me.ClearTemporaryListToolStripMenuItem})
        Me.cmnuFileOptions.Name = "cmnuFileOptions"
        Me.cmnuFileOptions.Size = New System.Drawing.Size(194, 70)
        '
        'AddToTemporaryListToolStripMenuItem
        '
        Me.AddToTemporaryListToolStripMenuItem.Name = "AddToTemporaryListToolStripMenuItem"
        Me.AddToTemporaryListToolStripMenuItem.Size = New System.Drawing.Size(193, 22)
        Me.AddToTemporaryListToolStripMenuItem.Text = "Add To Temporary List"
        '
        'GoToTemporaryListToolStripMenuItem
        '
        Me.GoToTemporaryListToolStripMenuItem.Name = "GoToTemporaryListToolStripMenuItem"
        Me.GoToTemporaryListToolStripMenuItem.Size = New System.Drawing.Size(193, 22)
        Me.GoToTemporaryListToolStripMenuItem.Text = "Edit Temporary List"
        '
        'ClearTemporaryListToolStripMenuItem
        '
        Me.ClearTemporaryListToolStripMenuItem.Name = "ClearTemporaryListToolStripMenuItem"
        Me.ClearTemporaryListToolStripMenuItem.Size = New System.Drawing.Size(193, 22)
        Me.ClearTemporaryListToolStripMenuItem.Text = "Clear Temporary List"
        '
        'NppRepositories
        '
        Me.NppRepositories.ActiveGradientHighColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(225, Byte), Integer), CType(CType(155, Byte), Integer))
        Me.NppRepositories.ActiveGradientLowColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(165, Byte), Integer), CType(CType(78, Byte), Integer))
        Me.NppRepositories.AutoScroll = True
        Me.NppRepositories.ButtonFont = New System.Drawing.Font("Times New Roman", 8.25!, System.Drawing.FontStyle.Bold)
        Me.NppRepositories.ButtonForeColor = System.Drawing.SystemColors.ControlText
        Me.NppRepositories.Controls.Add(Me.TreeViewRepository)
        Me.NppRepositories.GradientHighColor = System.Drawing.SystemColors.ButtonHighlight
        Me.NppRepositories.GradientLowColor = System.Drawing.SystemColors.GradientActiveCaption
        Me.NppRepositories.HighlightGradientHighColor = System.Drawing.Color.White
        Me.NppRepositories.HighlightGradientLowColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(165, Byte), Integer), CType(CType(78, Byte), Integer))
        Me.NppRepositories.Image = Nothing
        Me.NppRepositories.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
        Me.NppRepositories.ImageFooter = Nothing
        Me.NppRepositories.ImageIndex = -1
        Me.NppRepositories.ImageIndexFooter = -1
        Me.NppRepositories.ImageKey = ""
        Me.NppRepositories.ImageKeyFooter = ""
        Me.NppRepositories.ImageList = Nothing
        Me.NppRepositories.ImageListFooter = Nothing
        Me.NppRepositories.Key = "Repository"
        Me.NppRepositories.Location = New System.Drawing.Point(1, 27)
        Me.NppRepositories.Name = "NppRepositories"
        Me.NppRepositories.Size = New System.Drawing.Size(243, 518)
        Me.NppRepositories.TabIndex = 0
        Me.NppRepositories.Text = "Repositories"
        Me.NppRepositories.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
        Me.NppRepositories.ToolTipText = Nothing
        '
        'TreeViewRepository
        '
        Me.TreeViewRepository.BackColor = System.Drawing.Color.White
        Me.TreeViewRepository.Dock = System.Windows.Forms.DockStyle.Fill
        Me.TreeViewRepository.ImageIndex = 4
        Me.TreeViewRepository.ImageList = Me.TreeViewIcons
        Me.TreeViewRepository.Location = New System.Drawing.Point(0, 0)
        Me.TreeViewRepository.Name = "TreeViewRepository"
        Me.TreeViewRepository.SelectedImageIndex = 2
        Me.TreeViewRepository.Size = New System.Drawing.Size(243, 518)
        Me.TreeViewRepository.TabIndex = 0
        '
        'TreeViewIcons
        '
        Me.TreeViewIcons.ImageStream = CType(resources.GetObject("TreeViewIcons.ImageStream"), System.Windows.Forms.ImageListStreamer)
        Me.TreeViewIcons.TransparentColor = System.Drawing.Color.Empty
        Me.TreeViewIcons.Images.SetKeyName(0, "Blue Folder XP.ico")
        Me.TreeViewIcons.Images.SetKeyName(1, "Green Folder.ico")
        Me.TreeViewIcons.Images.SetKeyName(2, "Red Folder.ico")
        Me.TreeViewIcons.Images.SetKeyName(3, "File.ico")
        Me.TreeViewIcons.Images.SetKeyName(4, "My Fireworks Files XP2.ico")
        '
        'pnlMyCompter
        '
        Me.pnlMyCompter.Controls.Add(Me.lstvMyComputer)
        Me.pnlMyCompter.Controls.Add(Me.ThemeToolStrip1)
        Me.pnlMyCompter.Dock = System.Windows.Forms.DockStyle.Fill
        Me.pnlMyCompter.Location = New System.Drawing.Point(245, 0)
        Me.pnlMyCompter.Name = "pnlMyCompter"
        Me.pnlMyCompter.Size = New System.Drawing.Size(763, 647)
        Me.pnlMyCompter.TabIndex = 1
        Me.pnlMyCompter.Visible = False
        '
        'ThemeToolStrip1
        '
        Me.ThemeToolStrip1.BackColor = System.Drawing.Color.Transparent
        Me.ThemeToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripSeparator2, Me.ToolStripDropDownButton3, Me.ToolStripSeparator1, Me.ToolStripDropDownButton1})
        Me.ThemeToolStrip1.Location = New System.Drawing.Point(0, 0)
        Me.ThemeToolStrip1.Name = "ThemeToolStrip1"
        Me.ThemeToolStrip1.Size = New System.Drawing.Size(763, 25)
        Me.ThemeToolStrip1.Style = "Vista"
        Me.ThemeToolStrip1.TabIndex = 1
        Me.ThemeToolStrip1.Text = "ThemeToolStrip1"
        '
        'ToolStripSeparator2
        '
        Me.ToolStripSeparator2.Name = "ToolStripSeparator2"
        Me.ToolStripSeparator2.Size = New System.Drawing.Size(6, 25)
        '
        'ToolStripDropDownButton3
        '
        Me.ToolStripDropDownButton3.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.AddSelectFileToListToolStripMenuItem, Me.EditListToolStripMenuItem, Me.ClearListToolStripMenuItem})
        Me.ToolStripDropDownButton3.Image = Global.VirtualDesk.My.Resources.Resources.window_list_16x16
        Me.ToolStripDropDownButton3.ImageTransparentColor = System.Drawing.Color.Magenta
        Me.ToolStripDropDownButton3.Name = "ToolStripDropDownButton3"
        Me.ToolStripDropDownButton3.Size = New System.Drawing.Size(162, 22)
        Me.ToolStripDropDownButton3.Text = "Create Temporary File List"
        Me.ToolStripDropDownButton3.ToolTipText = "Crete File List to Add files to Repository"
        '
        'AddSelectFileToListToolStripMenuItem
        '
        Me.AddSelectFileToListToolStripMenuItem.Image = Global.VirtualDesk.My.Resources.Resources.upload_server
        Me.AddSelectFileToListToolStripMenuItem.Name = "AddSelectFileToListToolStripMenuItem"
        Me.AddSelectFileToListToolStripMenuItem.Size = New System.Drawing.Size(244, 22)
        Me.AddSelectFileToListToolStripMenuItem.Text = "Add Select File To Temporary List"
        '
        'EditListToolStripMenuItem
        '
        Me.EditListToolStripMenuItem.Image = Global.VirtualDesk.My.Resources.Resources.open_repository
        Me.EditListToolStripMenuItem.Name = "EditListToolStripMenuItem"
        Me.EditListToolStripMenuItem.Size = New System.Drawing.Size(244, 22)
        Me.EditListToolStripMenuItem.Text = "Edit Temporary List"
        '
        'ClearListToolStripMenuItem
        '
        Me.ClearListToolStripMenuItem.Image = Global.VirtualDesk.My.Resources.Resources.icontexto_webdev_remove
        Me.ClearListToolStripMenuItem.Name = "ClearListToolStripMenuItem"
        Me.ClearListToolStripMenuItem.Size = New System.Drawing.Size(244, 22)
        Me.ClearListToolStripMenuItem.Text = "Clear Temporary List"
        '
        'ToolStripSeparator1
        '
        Me.ToolStripSeparator1.BackColor = System.Drawing.Color.Black
        Me.ToolStripSeparator1.Name = "ToolStripSeparator1"
        Me.ToolStripSeparator1.Size = New System.Drawing.Size(6, 25)
        '
        'ToolStripDropDownButton1
        '
        Me.ToolStripDropDownButton1.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.DetailToolStripMenuItem, Me.ListToolStripMenuItem, Me.SmallIconsToolStripMenuItem, Me.LargeIconsToolStripMenuItem, Me.TitleToolStripMenuItem})
        Me.ToolStripDropDownButton1.Image = Global.VirtualDesk.My.Resources.Resources.Windows_View_Icon_16x16
        Me.ToolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta
        Me.ToolStripDropDownButton1.Name = "ToolStripDropDownButton1"
        Me.ToolStripDropDownButton1.Size = New System.Drawing.Size(77, 22)
        Me.ToolStripDropDownButton1.Text = "File View"
        '
        'DetailToolStripMenuItem
        '
        Me.DetailToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
        Me.DetailToolStripMenuItem.Name = "DetailToolStripMenuItem"
        Me.DetailToolStripMenuItem.Size = New System.Drawing.Size(141, 22)
        Me.DetailToolStripMenuItem.Text = "Detail"
        '
        'ListToolStripMenuItem
        '
        Me.ListToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
        Me.ListToolStripMenuItem.Name = "ListToolStripMenuItem"
        Me.ListToolStripMenuItem.Size = New System.Drawing.Size(141, 22)
        Me.ListToolStripMenuItem.Text = "List"
        '
        'SmallIconsToolStripMenuItem
        '
        Me.SmallIconsToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
        Me.SmallIconsToolStripMenuItem.Name = "SmallIconsToolStripMenuItem"
        Me.SmallIconsToolStripMenuItem.Size = New System.Drawing.Size(141, 22)
        Me.SmallIconsToolStripMenuItem.Text = "Small Icons"
        '
        'LargeIconsToolStripMenuItem
        '
        Me.LargeIconsToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
        Me.LargeIconsToolStripMenuItem.Name = "LargeIconsToolStripMenuItem"
        Me.LargeIconsToolStripMenuItem.Size = New System.Drawing.Size(141, 22)
        Me.LargeIconsToolStripMenuItem.Text = "Large Icons"
        '
        'TitleToolStripMenuItem
        '
        Me.TitleToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
        Me.TitleToolStripMenuItem.Name = "TitleToolStripMenuItem"
        Me.TitleToolStripMenuItem.Size = New System.Drawing.Size(141, 22)
        Me.TitleToolStripMenuItem.Text = "Tiles"
        Me.TitleToolStripMenuItem.Visible = False
        '
        'pnlRepository
        '
        Me.pnlRepository.Controls.Add(Me.dgDocuments)
        Me.pnlRepository.Controls.Add(Me.Panel1)
        Me.pnlRepository.Controls.Add(Me.GroupBox1)
        Me.pnlRepository.Dock = System.Windows.Forms.DockStyle.Fill
        Me.pnlRepository.Location = New System.Drawing.Point(245, 0)
        Me.pnlRepository.Name = "pnlRepository"
        Me.pnlRepository.Size = New System.Drawing.Size(763, 647)
        Me.pnlRepository.TabIndex = 2
        '
        'dgDocuments
        '
        Me.dgDocuments.AllowUserToAddRows = False
        Me.dgDocuments.AllowUserToDeleteRows = False
        Me.dgDocuments.AutoGenerateColumns = False
        Me.dgDocuments.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
        Me.dgDocuments.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.DOCIDDataGridViewTextBoxColumn, Me.DOCNAMEDataGridViewTextBoxColumn, Me.DOCCATTYPEDataGridViewTextBoxColumn, Me.DOCSUBCATTYPEDataGridViewTextBoxColumn, Me.DOCAUTHORDataGridViewTextBoxColumn, Me.DOCDATEDataGridViewTextBoxColumn, Me.DOCTYPEDataGridViewTextBoxColumn, Me.DOCVERSIONDataGridViewTextBoxColumn, Me.DOCSUBJECTDataGridViewTextBoxColumn, Me.DOCKEYWORDSDataGridViewTextBoxColumn})
        Me.dgDocuments.DataSource = Me.VDOCUMENTSBindingSource
        Me.dgDocuments.Dock = System.Windows.Forms.DockStyle.Top
        Me.dgDocuments.Location = New System.Drawing.Point(0, 40)
        Me.dgDocuments.MultiSelect = False
        Me.dgDocuments.Name = "dgDocuments"
        Me.dgDocuments.ReadOnly = True
        Me.dgDocuments.Size = New System.Drawing.Size(763, 272)
        Me.dgDocuments.TabIndex = 0
        '
        'DOCIDDataGridViewTextBoxColumn
        '
        Me.DOCIDDataGridViewTextBoxColumn.DataPropertyName = "DOC_ID"
        Me.DOCIDDataGridViewTextBoxColumn.HeaderText = "#"
        Me.DOCIDDataGridViewTextBoxColumn.Name = "DOCIDDataGridViewTextBoxColumn"
        Me.DOCIDDataGridViewTextBoxColumn.ReadOnly = True
        Me.DOCIDDataGridViewTextBoxColumn.Width = 25
        '
        'DOCNAMEDataGridViewTextBoxColumn
        '
        Me.DOCNAMEDataGridViewTextBoxColumn.DataPropertyName = "DOC_NAME"
        Me.DOCNAMEDataGridViewTextBoxColumn.HeaderText = "Document Name"
        Me.DOCNAMEDataGridViewTextBoxColumn.Name = "DOCNAMEDataGridViewTextBoxColumn"
        Me.DOCNAMEDataGridViewTextBoxColumn.ReadOnly = True
        Me.DOCNAMEDataGridViewTextBoxColumn.Width = 200
        '
        'DOCCATTYPEDataGridViewTextBoxColumn
        '
        Me.DOCCATTYPEDataGridViewTextBoxColumn.DataPropertyName = "DOC_CAT_TYPE"
        Me.DOCCATTYPEDataGridViewTextBoxColumn.HeaderText = "Repository"
        Me.DOCCATTYPEDataGridViewTextBoxColumn.Name = "DOCCATTYPEDataGridViewTextBoxColumn"
        Me.DOCCATTYPEDataGridViewTextBoxColumn.ReadOnly = True
        Me.DOCCATTYPEDataGridViewTextBoxColumn.Width = 200
        '
        'DOCSUBCATTYPEDataGridViewTextBoxColumn
        '
        Me.DOCSUBCATTYPEDataGridViewTextBoxColumn.DataPropertyName = "DOC_SUB_CAT_TYPE"
        Me.DOCSUBCATTYPEDataGridViewTextBoxColumn.HeaderText = "Sub Repository"
        Me.DOCSUBCATTYPEDataGridViewTextBoxColumn.Name = "DOCSUBCATTYPEDataGridViewTextBoxColumn"
        Me.DOCSUBCATTYPEDataGridViewTextBoxColumn.ReadOnly = True
        Me.DOCSUBCATTYPEDataGridViewTextBoxColumn.Width = 200
        '
        'DOCAUTHORDataGridViewTextBoxColumn
        '
        Me.DOCAUTHORDataGridViewTextBoxColumn.DataPropertyName = "DOC_AUTHOR"
        Me.DOCAUTHORDataGridViewTextBoxColumn.HeaderText = "Author"
        Me.DOCAUTHORDataGridViewTextBoxColumn.Name = "DOCAUTHORDataGridViewTextBoxColumn"
        Me.DOCAUTHORDataGridViewTextBoxColumn.ReadOnly = True
        Me.DOCAUTHORDataGridViewTextBoxColumn.Width = 200
        '
        'DOCDATEDataGridViewTextBoxColumn
        '
        Me.DOCDATEDataGridViewTextBoxColumn.DataPropertyName = "DOC_DATE"
        Me.DOCDATEDataGridViewTextBoxColumn.HeaderText = "Modify Date"
        Me.DOCDATEDataGridViewTextBoxColumn.Name = "DOCDATEDataGridViewTextBoxColumn"
        Me.DOCDATEDataGridViewTextBoxColumn.ReadOnly = True
        Me.DOCDATEDataGridViewTextBoxColumn.Width = 200
        '
        'DOCTYPEDataGridViewTextBoxColumn
        '
        Me.DOCTYPEDataGridViewTextBoxColumn.DataPropertyName = "DOC_TYPE"
        Me.DOCTYPEDataGridViewTextBoxColumn.HeaderText = "Document Type"
        Me.DOCTYPEDataGridViewTextBoxColumn.Name = "DOCTYPEDataGridViewTextBoxColumn"
        Me.DOCTYPEDataGridViewTextBoxColumn.ReadOnly = True
        Me.DOCTYPEDataGridViewTextBoxColumn.Width = 200
        '
        'DOCVERSIONDataGridViewTextBoxColumn
        '
        Me.DOCVERSIONDataGridViewTextBoxColumn.DataPropertyName = "DOC_VERSION"
        Me.DOCVERSIONDataGridViewTextBoxColumn.HeaderText = "Version"
        Me.DOCVERSIONDataGridViewTextBoxColumn.Name = "DOCVERSIONDataGridViewTextBoxColumn"
        Me.DOCVERSIONDataGridViewTextBoxColumn.ReadOnly = True
        '
        'DOCSUBJECTDataGridViewTextBoxColumn
        '
        Me.DOCSUBJECTDataGridViewTextBoxColumn.DataPropertyName = "DOC_SUBJECT"
        Me.DOCSUBJECTDataGridViewTextBoxColumn.HeaderText = "Document About"
        Me.DOCSUBJECTDataGridViewTextBoxColumn.Name = "DOCSUBJECTDataGridViewTextBoxColumn"
        Me.DOCSUBJECTDataGridViewTextBoxColumn.ReadOnly = True
        Me.DOCSUBJECTDataGridViewTextBoxColumn.Width = 200
        '
        'DOCKEYWORDSDataGridViewTextBoxColumn
        '
        Me.DOCKEYWORDSDataGridViewTextBoxColumn.DataPropertyName = "DOC_KEYWORDS"
        Me.DOCKEYWORDSDataGridViewTextBoxColumn.HeaderText = "Keywords"
        Me.DOCKEYWORDSDataGridViewTextBoxColumn.Name = "DOCKEYWORDSDataGridViewTextBoxColumn"
        Me.DOCKEYWORDSDataGridViewTextBoxColumn.ReadOnly = True
        Me.DOCKEYWORDSDataGridViewTextBoxColumn.Width = 300
        '
        'VDOCUMENTSBindingSource
        '
        Me.VDOCUMENTSBindingSource.DataMember = "V_DOCUMENTS"
        Me.VDOCUMENTSBindingSource.DataSource = Me.DsTempList
        '
        'DsTempList
        '
        Me.DsTempList.DataSetName = "DsTempList"
        Me.DsTempList.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
        '
        'Panel1
        '
        Me.Panel1.Controls.Add(Me.btnClearFilter)
        Me.Panel1.Controls.Add(Me.btnSearch)
        Me.Panel1.Controls.Add(Me.lblColumn)
        Me.Panel1.Controls.Add(Me.txtSearch)
        Me.Panel1.Controls.Add(Me.Label9)
        Me.Panel1.Dock = System.Windows.Forms.DockStyle.Top
        Me.Panel1.Location = New System.Drawing.Point(0, 0)
        Me.Panel1.Name = "Panel1"
        Me.Panel1.Size = New System.Drawing.Size(763, 40)
        Me.Panel1.TabIndex = 4
        '
        'btnClearFilter
        '
        Me.btnClearFilter.DropDown = Nothing
        Me.btnClearFilter.DropDownAlignment = BurtonSoftware.ThemeKit.ThemeButton.DropDownPosition.Right
        Me.btnClearFilter.Image = Global.VirtualDesk.My.Resources.Resources.icontexto_webdev_reload
        Me.btnClearFilter.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
        Me.btnClearFilter.ImageIndex = 0
        Me.btnClearFilter.ImageList = Nothing
        Me.btnClearFilter.Location = New System.Drawing.Point(430, 3)
        Me.btnClearFilter.Name = "btnClearFilter"
        Me.btnClearFilter.Size = New System.Drawing.Size(87, 31)
        Me.btnClearFilter.Style = "Vista"
        Me.btnClearFilter.TabIndex = 6
        Me.btnClearFilter.Text = "Clear Filter"
        Me.btnClearFilter.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'btnSearch
        '
        Me.btnSearch.DropDown = Nothing
        Me.btnSearch.DropDownAlignment = BurtonSoftware.ThemeKit.ThemeButton.DropDownPosition.Right
        Me.btnSearch.Image = Global.VirtualDesk.My.Resources.Resources.icontexto_webdev_search
        Me.btnSearch.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
        Me.btnSearch.ImageIndex = 0
        Me.btnSearch.ImageList = Nothing
        Me.btnSearch.Location = New System.Drawing.Point(357, 3)
        Me.btnSearch.Name = "btnSearch"
        Me.btnSearch.Size = New System.Drawing.Size(67, 31)
        Me.btnSearch.Style = "Vista"
        Me.btnSearch.TabIndex = 5
        Me.btnSearch.Text = "Search"
        Me.btnSearch.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'lblColumn
        '
        Me.lblColumn.AutoSize = True
        Me.lblColumn.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lblColumn.ForeColor = System.Drawing.Color.Red
        Me.lblColumn.Location = New System.Drawing.Point(545, 13)
        Me.lblColumn.Name = "lblColumn"
        Me.lblColumn.Size = New System.Drawing.Size(154, 13)
        Me.lblColumn.TabIndex = 2
        Me.lblColumn.Text = "Select Column For Search"
        '
        'txtSearch
        '
        Me.txtSearch.ForeColor = System.Drawing.Color.DarkGray
        Me.txtSearch.Location = New System.Drawing.Point(110, 9)
        Me.txtSearch.Name = "txtSearch"
        Me.txtSearch.Size = New System.Drawing.Size(243, 20)
        Me.txtSearch.TabIndex = 1
        Me.txtSearch.Text = "Type Search Criteria"
        '
        'Label9
        '
        Me.Label9.AutoSize = True
        Me.Label9.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label9.Location = New System.Drawing.Point(13, 13)
        Me.Label9.Name = "Label9"
        Me.Label9.Size = New System.Drawing.Size(92, 13)
        Me.Label9.TabIndex = 0
        Me.Label9.Text = "Search Option:"
        '
        'GroupBox1
        '
        Me.GroupBox1.Controls.Add(Me.btn_EditDocInf)
        Me.GroupBox1.Controls.Add(Me.GroupBox3)
        Me.GroupBox1.Controls.Add(Me.GroupBox2)
        Me.GroupBox1.Controls.Add(Me.TextBox8)
        Me.GroupBox1.Controls.Add(Me.TextBox7)
        Me.GroupBox1.Controls.Add(Me.TextBox6)
        Me.GroupBox1.Controls.Add(Me.TextBox5)
        Me.GroupBox1.Controls.Add(Me.TextBox4)
        Me.GroupBox1.Controls.Add(Me.TextBox3)
        Me.GroupBox1.Controls.Add(Me.TextBox2)
        Me.GroupBox1.Controls.Add(Me.TextBox1)
        Me.GroupBox1.Controls.Add(Me.Label8)
        Me.GroupBox1.Controls.Add(Me.Label7)
        Me.GroupBox1.Controls.Add(Me.Label6)
        Me.GroupBox1.Controls.Add(Me.Label5)
        Me.GroupBox1.Controls.Add(Me.Label4)
        Me.GroupBox1.Controls.Add(Me.Label3)
        Me.GroupBox1.Controls.Add(Me.Label2)
        Me.GroupBox1.Controls.Add(Me.Label1)
        Me.GroupBox1.Location = New System.Drawing.Point(6, 318)
        Me.GroupBox1.Name = "GroupBox1"
        Me.GroupBox1.Size = New System.Drawing.Size(745, 294)
        Me.GroupBox1.TabIndex = 3
        Me.GroupBox1.TabStop = False
        Me.GroupBox1.Text = "Document General Information"
        '
        'btn_EditDocInf
        '
        Me.btn_EditDocInf.DropDown = Nothing
        Me.btn_EditDocInf.DropDownAlignment = BurtonSoftware.ThemeKit.ThemeButton.DropDownPosition.Right
        Me.btn_EditDocInf.Image = Global.VirtualDesk.My.Resources.Resources.icontexto_webdev_ok1
        Me.btn_EditDocInf.ImageAlign = System.Drawing.ContentAlignment.TopCenter
        Me.btn_EditDocInf.ImageIndex = 0
        Me.btn_EditDocInf.ImageList = Nothing
        Me.btn_EditDocInf.Location = New System.Drawing.Point(25, 232)
        Me.btn_EditDocInf.Name = "btn_EditDocInf"
        Me.btn_EditDocInf.Size = New System.Drawing.Size(94, 46)
        Me.btn_EditDocInf.Style = "Vista"
        Me.btn_EditDocInf.TabIndex = 23
        Me.btn_EditDocInf.Text = "Edit Information"
        Me.btn_EditDocInf.TextAlign = System.Drawing.ContentAlignment.BottomCenter
        '
        'GroupBox3
        '
        Me.GroupBox3.Controls.Add(Me.DGCOMMENTS)
        Me.GroupBox3.Location = New System.Drawing.Point(443, 146)
        Me.GroupBox3.Name = "GroupBox3"
        Me.GroupBox3.Size = New System.Drawing.Size(299, 147)
        Me.GroupBox3.TabIndex = 22
        Me.GroupBox3.TabStop = False
        Me.GroupBox3.Text = "Document Comments"
        '
        'DGCOMMENTS
        '
        Me.DGCOMMENTS.AllowUserToAddRows = False
        Me.DGCOMMENTS.AllowUserToDeleteRows = False
        Me.DGCOMMENTS.AutoGenerateColumns = False
        Me.DGCOMMENTS.BorderStyle = System.Windows.Forms.BorderStyle.None
        Me.DGCOMMENTS.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.[Single]
        Me.DGCOMMENTS.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
        Me.DGCOMMENTS.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.COMMENT_ID, Me.COMMENTDATEDataGridViewTextBoxColumn, Me.COMMENTTITLEDataGridViewTextBoxColumn, Me.COMMENTDESCDataGridViewTextBoxColumn})
        Me.DGCOMMENTS.DataSource = Me.TBLDOCCOMMENTBindingSource
        Me.DGCOMMENTS.Dock = System.Windows.Forms.DockStyle.Fill
        Me.DGCOMMENTS.EnableHeadersVisualStyles = False
        Me.DGCOMMENTS.Location = New System.Drawing.Point(3, 16)
        Me.DGCOMMENTS.Name = "DGCOMMENTS"
        Me.DGCOMMENTS.ReadOnly = True
        Me.DGCOMMENTS.RowHeadersVisible = False
        Me.DGCOMMENTS.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
        Me.DGCOMMENTS.Size = New System.Drawing.Size(293, 128)
        Me.DGCOMMENTS.TabIndex = 0
        '
        'COMMENT_ID
        '
        Me.COMMENT_ID.DataPropertyName = "COMMENT_ID"
        Me.COMMENT_ID.HeaderText = "#"
        Me.COMMENT_ID.Name = "COMMENT_ID"
        Me.COMMENT_ID.ReadOnly = True
        Me.COMMENT_ID.Visible = False
        '
        'COMMENTDATEDataGridViewTextBoxColumn
        '
        Me.COMMENTDATEDataGridViewTextBoxColumn.DataPropertyName = "COMMENT_DATE"
        Me.COMMENTDATEDataGridViewTextBoxColumn.HeaderText = "Date"
        Me.COMMENTDATEDataGridViewTextBoxColumn.Name = "COMMENTDATEDataGridViewTextBoxColumn"
        Me.COMMENTDATEDataGridViewTextBoxColumn.ReadOnly = True
        '
        'COMMENTTITLEDataGridViewTextBoxColumn
        '
        Me.COMMENTTITLEDataGridViewTextBoxColumn.DataPropertyName = "COMMENT_TITLE"
        Me.COMMENTTITLEDataGridViewTextBoxColumn.HeaderText = "Title"
        Me.COMMENTTITLEDataGridViewTextBoxColumn.Name = "COMMENTTITLEDataGridViewTextBoxColumn"
        Me.COMMENTTITLEDataGridViewTextBoxColumn.ReadOnly = True
        '
        'COMMENTDESCDataGridViewTextBoxColumn
        '
        Me.COMMENTDESCDataGridViewTextBoxColumn.DataPropertyName = "COMMENT_DESC"
        Me.COMMENTDESCDataGridViewTextBoxColumn.HeaderText = "Comment"
        Me.COMMENTDESCDataGridViewTextBoxColumn.Name = "COMMENTDESCDataGridViewTextBoxColumn"
        Me.COMMENTDESCDataGridViewTextBoxColumn.ReadOnly = True
        '
        'TBLDOCCOMMENTBindingSource
        '
        Me.TBLDOCCOMMENTBindingSource.DataMember = "TBL_DOC_COMMENT"
        Me.TBLDOCCOMMENTBindingSource.DataSource = Me.DsTempList
        '
        'GroupBox2
        '
        Me.GroupBox2.Controls.Add(Me.btnDuplicate)
        Me.GroupBox2.Controls.Add(Me.btnCopy)
        Me.GroupBox2.Controls.Add(Me.ThemeButton3)
        Me.GroupBox2.Controls.Add(Me.btnViewDocument)
        Me.GroupBox2.Controls.Add(Me.btn_addComment)
        Me.GroupBox2.Controls.Add(Me.btn_editDoc)
        Me.GroupBox2.Location = New System.Drawing.Point(437, 17)
        Me.GroupBox2.Name = "GroupBox2"
        Me.GroupBox2.Size = New System.Drawing.Size(305, 123)
        Me.GroupBox2.TabIndex = 21
        Me.GroupBox2.TabStop = False
        Me.GroupBox2.Text = "Tools To Work"
        '
        'btnDuplicate
        '
        Me.btnDuplicate.DropDown = Nothing
        Me.btnDuplicate.DropDownAlignment = BurtonSoftware.ThemeKit.ThemeButton.DropDownPosition.Right
        Me.btnDuplicate.Image = Global.VirtualDesk.My.Resources.Resources.icontexto_webdev_site_map
        Me.btnDuplicate.ImageAlign = System.Drawing.ContentAlignment.TopCenter
        Me.btnDuplicate.ImageIndex = 0
        Me.btnDuplicate.ImageList = Nothing
        Me.btnDuplicate.Location = New System.Drawing.Point(7, 71)
        Me.btnDuplicate.Name = "btnDuplicate"
        Me.btnDuplicate.Size = New System.Drawing.Size(94, 46)
        Me.btnDuplicate.Style = "Vista"
        Me.btnDuplicate.TabIndex = 7
        Me.btnDuplicate.Text = "Duplicate"
        Me.btnDuplicate.TextAlign = System.Drawing.ContentAlignment.BottomCenter
        '
        'btnCopy
        '
        Me.btnCopy.DropDown = Nothing
        Me.btnCopy.DropDownAlignment = BurtonSoftware.ThemeKit.ThemeButton.DropDownPosition.Right
        Me.btnCopy.Image = Global.VirtualDesk.My.Resources.Resources.download_server
        Me.btnCopy.ImageAlign = System.Drawing.ContentAlignment.TopCenter
        Me.btnCopy.ImageIndex = 0
        Me.btnCopy.ImageList = Nothing
        Me.btnCopy.Location = New System.Drawing.Point(206, 18)
        Me.btnCopy.Name = "btnCopy"
        Me.btnCopy.Size = New System.Drawing.Size(94, 46)
        Me.btnCopy.Style = "Vista"
        Me.btnCopy.TabIndex = 6
        Me.btnCopy.Text = "Create a Copy"
        Me.btnCopy.TextAlign = System.Drawing.ContentAlignment.BottomCenter
        '
        'ThemeButton3
        '
        Me.ThemeButton3.DropDown = Nothing
        Me.ThemeButton3.DropDownAlignment = BurtonSoftware.ThemeKit.ThemeButton.DropDownPosition.Right
        Me.ThemeButton3.Image = Global.VirtualDesk.My.Resources.Resources.icontexto_webdev_cancel
        Me.ThemeButton3.ImageAlign = System.Drawing.ContentAlignment.TopCenter
        Me.ThemeButton3.ImageIndex = 0
        Me.ThemeButton3.ImageList = Nothing
        Me.ThemeButton3.Location = New System.Drawing.Point(106, 70)
        Me.ThemeButton3.Name = "ThemeButton3"
        Me.ThemeButton3.Size = New System.Drawing.Size(94, 46)
        Me.ThemeButton3.Style = "Vista"
        Me.ThemeButton3.TabIndex = 4
        Me.ThemeButton3.Text = "Delete"
        Me.ThemeButton3.TextAlign = System.Drawing.ContentAlignment.BottomCenter
        '
        'btnViewDocument
        '
        Me.btnViewDocument.DropDown = Nothing
        Me.btnViewDocument.DropDownAlignment = BurtonSoftware.ThemeKit.ThemeButton.DropDownPosition.Right
        Me.btnViewDocument.Image = Global.VirtualDesk.My.Resources.Resources.icontexto_webdev_file
        Me.btnViewDocument.ImageAlign = System.Drawing.ContentAlignment.TopCenter
        Me.btnViewDocument.ImageIndex = 0
        Me.btnViewDocument.ImageList = Nothing
        Me.btnViewDocument.Location = New System.Drawing.Point(6, 18)
        Me.btnViewDocument.Name = "btnViewDocument"
        Me.btnViewDocument.Size = New System.Drawing.Size(94, 46)
        Me.btnViewDocument.Style = "Vista"
        Me.btnViewDocument.TabIndex = 2
        Me.btnViewDocument.Text = "View Document"
        Me.btnViewDocument.TextAlign = System.Drawing.ContentAlignment.BottomCenter
        '
        'btn_addComment
        '
        Me.btn_addComment.DropDown = Nothing
        Me.btn_addComment.DropDownAlignment = BurtonSoftware.ThemeKit.ThemeButton.DropDownPosition.Right
        Me.btn_addComment.Image = Global.VirtualDesk.My.Resources.Resources.icontexto_webdev_chat
        Me.btn_addComment.ImageAlign = System.Drawing.ContentAlignment.TopCenter
        Me.btn_addComment.ImageIndex = 0
        Me.btn_addComment.ImageList = Nothing
        Me.btn_addComment.Location = New System.Drawing.Point(206, 70)
        Me.btn_addComment.Name = "btn_addComment"
        Me.btn_addComment.Size = New System.Drawing.Size(94, 46)
        Me.btn_addComment.Style = "Vista"
        Me.btn_addComment.TabIndex = 1
        Me.btn_addComment.Text = "Add Comment"
        Me.btn_addComment.TextAlign = System.Drawing.ContentAlignment.BottomCenter
        '
        'btn_editDoc
        '
        Me.btn_editDoc.DropDown = Nothing
        Me.btn_editDoc.DropDownAlignment = BurtonSoftware.ThemeKit.ThemeButton.DropDownPosition.Right
        Me.btn_editDoc.Image = Global.VirtualDesk.My.Resources.Resources.icontexto_webdev_config
        Me.btn_editDoc.ImageAlign = System.Drawing.ContentAlignment.TopCenter
        Me.btn_editDoc.ImageIndex = 0
        Me.btn_editDoc.ImageList = Nothing
        Me.btn_editDoc.Location = New System.Drawing.Point(106, 18)
        Me.btn_editDoc.Name = "btn_editDoc"
        Me.btn_editDoc.Size = New System.Drawing.Size(94, 46)
        Me.btn_editDoc.Style = "Vista"
        Me.btn_editDoc.TabIndex = 0
        Me.btn_editDoc.Text = "Edit Document"
        Me.btn_editDoc.TextAlign = System.Drawing.ContentAlignment.BottomCenter
        '
        'TextBox8
        '
        Me.TextBox8.BackColor = System.Drawing.Color.White
        Me.TextBox8.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.VDOCUMENTSBindingSource, "DOC_CAT_TYPE", True))
        Me.TextBox8.Location = New System.Drawing.Point(167, 17)
        Me.TextBox8.Name = "TextBox8"
        Me.TextBox8.ReadOnly = True
        Me.TextBox8.Size = New System.Drawing.Size(264, 20)
        Me.TextBox8.TabIndex = 20
        '
        'TextBox7
        '
        Me.TextBox7.BackColor = System.Drawing.Color.White
        Me.TextBox7.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.VDOCUMENTSBindingSource, "DOC_SUB_CAT_TYPE", True))
        Me.TextBox7.Location = New System.Drawing.Point(167, 43)
        Me.TextBox7.Name = "TextBox7"
        Me.TextBox7.ReadOnly = True
        Me.TextBox7.Size = New System.Drawing.Size(264, 20)
        Me.TextBox7.TabIndex = 19
        '
        'TextBox6
        '
        Me.TextBox6.BackColor = System.Drawing.Color.White
        Me.TextBox6.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.VDOCUMENTSBindingSource, "DOC_DATE", True))
        Me.TextBox6.Location = New System.Drawing.Point(167, 69)
        Me.TextBox6.Name = "TextBox6"
        Me.TextBox6.ReadOnly = True
        Me.TextBox6.Size = New System.Drawing.Size(205, 20)
        Me.TextBox6.TabIndex = 18
        '
        'TextBox5
        '
        Me.TextBox5.BackColor = System.Drawing.Color.White
        Me.TextBox5.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.VDOCUMENTSBindingSource, "DOC_KEYWORDS", True))
        Me.TextBox5.Location = New System.Drawing.Point(167, 196)
        Me.TextBox5.Multiline = True
        Me.TextBox5.Name = "TextBox5"
        Me.TextBox5.ReadOnly = True
        Me.TextBox5.Size = New System.Drawing.Size(264, 97)
        Me.TextBox5.TabIndex = 17
        '
        'TextBox4
        '
        Me.TextBox4.BackColor = System.Drawing.Color.White
        Me.TextBox4.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.VDOCUMENTSBindingSource, "DOC_SUBJECT", True))
        Me.TextBox4.Location = New System.Drawing.Point(167, 170)
        Me.TextBox4.Name = "TextBox4"
        Me.TextBox4.ReadOnly = True
        Me.TextBox4.Size = New System.Drawing.Size(264, 20)
        Me.TextBox4.TabIndex = 16
        '
        'TextBox3
        '
        Me.TextBox3.BackColor = System.Drawing.Color.White
        Me.TextBox3.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.VDOCUMENTSBindingSource, "DOC_AUTHOR", True))
        Me.TextBox3.Location = New System.Drawing.Point(167, 145)
        Me.TextBox3.Name = "TextBox3"
        Me.TextBox3.ReadOnly = True
        Me.TextBox3.Size = New System.Drawing.Size(264, 20)
        Me.TextBox3.TabIndex = 15
        '
        'TextBox2
        '
        Me.TextBox2.BackColor = System.Drawing.Color.White
        Me.TextBox2.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.VDOCUMENTSBindingSource, "DOC_NAME", True))
        Me.TextBox2.Location = New System.Drawing.Point(167, 120)
        Me.TextBox2.Name = "TextBox2"
        Me.TextBox2.ReadOnly = True
        Me.TextBox2.Size = New System.Drawing.Size(264, 20)
        Me.TextBox2.TabIndex = 14
        '
        'TextBox1
        '
        Me.TextBox1.BackColor = System.Drawing.Color.White
        Me.TextBox1.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.VDOCUMENTSBindingSource, "DOC_VERSION", True))
        Me.TextBox1.Location = New System.Drawing.Point(167, 95)
        Me.TextBox1.Name = "TextBox1"
        Me.TextBox1.ReadOnly = True
        Me.TextBox1.Size = New System.Drawing.Size(100, 20)
        Me.TextBox1.TabIndex = 13
        '
        'Label8
        '
        Me.Label8.AutoSize = True
        Me.Label8.Location = New System.Drawing.Point(6, 198)
        Me.Label8.Name = "Label8"
        Me.Label8.Size = New System.Drawing.Size(53, 13)
        Me.Label8.TabIndex = 9
        Me.Label8.Text = "Keywords"
        '
        'Label7
        '
        Me.Label7.AutoSize = True
        Me.Label7.Location = New System.Drawing.Point(6, 174)
        Me.Label7.Name = "Label7"
        Me.Label7.Size = New System.Drawing.Size(43, 13)
        Me.Label7.TabIndex = 8
        Me.Label7.Text = "Subject"
        Me.Label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
        '
        'Label6
        '
        Me.Label6.AutoSize = True
        Me.Label6.Location = New System.Drawing.Point(6, 147)
        Me.Label6.Name = "Label6"
        Me.Label6.Size = New System.Drawing.Size(38, 13)
        Me.Label6.TabIndex = 7
        Me.Label6.Text = "Author"
        '
        'Label5
        '
        Me.Label5.AutoSize = True
        Me.Label5.Location = New System.Drawing.Point(6, 123)
        Me.Label5.Name = "Label5"
        Me.Label5.Size = New System.Drawing.Size(87, 13)
        Me.Label5.TabIndex = 6
        Me.Label5.Text = "Document Name"
        '
        'Label4
        '
        Me.Label4.AutoSize = True
        Me.Label4.Location = New System.Drawing.Point(6, 95)
        Me.Label4.Name = "Label4"
        Me.Label4.Size = New System.Drawing.Size(94, 13)
        Me.Label4.TabIndex = 5
        Me.Label4.Text = "Document Version"
        '
        'Label3
        '
        Me.Label3.AutoSize = True
        Me.Label3.Location = New System.Drawing.Point(6, 69)
        Me.Label3.Name = "Label3"
        Me.Label3.Size = New System.Drawing.Size(113, 13)
        Me.Label3.TabIndex = 4
        Me.Label3.Text = "Last Modification Date"
        Me.Label3.TextAlign = System.Drawing.ContentAlignment.TopCenter
        '
        'Label2
        '
        Me.Label2.AutoSize = True
        Me.Label2.Location = New System.Drawing.Point(6, 43)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(131, 13)
        Me.Label2.TabIndex = 3
        Me.Label2.Text = "Document Sub Repository"
        '
        'Label1
        '
        Me.Label1.AutoSize = True
        Me.Label1.Location = New System.Drawing.Point(6, 17)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(109, 13)
        Me.Label1.TabIndex = 2
        Me.Label1.Text = "Document Repository"
        '
        'cmsCkeckin
        '
        Me.cmsCkeckin.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.LoadToRepositoryMenuItem, Me.CancelEditingMenuItem, Me.GetLastMenuItem})
        Me.cmsCkeckin.Name = "cmsCkeckin"
        Me.cmsCkeckin.Size = New System.Drawing.Size(246, 70)
        '
        'LoadToRepositoryMenuItem
        '
        Me.LoadToRepositoryMenuItem.Name = "LoadToRepositoryMenuItem"
        Me.LoadToRepositoryMenuItem.Size = New System.Drawing.Size(245, 22)
        Me.LoadToRepositoryMenuItem.Text = "Load To Repository"
        '
        'CancelEditingMenuItem
        '
        Me.CancelEditingMenuItem.Name = "CancelEditingMenuItem"
        Me.CancelEditingMenuItem.Size = New System.Drawing.Size(245, 22)
        Me.CancelEditingMenuItem.Text = "Cancel Editing"
        '
        'GetLastMenuItem
        '
        Me.GetLastMenuItem.Name = "GetLastMenuItem"
        Me.GetLastMenuItem.Size = New System.Drawing.Size(245, 22)
        Me.GetLastMenuItem.Text = "Get Last Version From Repository"
        '
        'TBLDOCCATBindingSource
        '
        Me.TBLDOCCATBindingSource.DataMember = "TBL_DOC_CAT"
        Me.TBLDOCCATBindingSource.DataSource = Me.DsTempList
        '
        'TBLDOCSUBCATBindingSource
        '
        Me.TBLDOCSUBCATBindingSource.DataMember = "TBL_DOC_SUB_CAT"
        Me.TBLDOCSUBCATBindingSource.DataSource = Me.DsTempList
        '
        'BindingSource1
        '
        Me.BindingSource1.DataMember = "TBL_DOC"
        Me.BindingSource1.DataSource = Me.DsTempList
        '
        'TbL_DOC_CATTableAdapter1
        '
        Me.TbL_DOC_CATTableAdapter1.ClearBeforeFill = True
        '
        'TbL_DOC_SUB_CATTableAdapter1
        '
        Me.TbL_DOC_SUB_CATTableAdapter1.ClearBeforeFill = True
        '
        'V_DOCUMENTSTableAdapter
        '
        Me.V_DOCUMENTSTableAdapter.ClearBeforeFill = True
        '
        'TBL_DOC_COMMENTTableAdapter
        '
        Me.TBL_DOC_COMMENTTableAdapter.ClearBeforeFill = True
        '
        'TbL_DOCTableAdapter1
        '
        Me.TbL_DOCTableAdapter1.ClearBeforeFill = True
        '
        'Documents
        '
        Me.ClientSize = New System.Drawing.Size(1008, 647)
        Me.Controls.Add(Me.pnlRepository)
        Me.Controls.Add(Me.pnlMyCompter)
        Me.Controls.Add(Me.VirtualMnu)
        Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
        Me.Name = "Documents"
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.Style = "Vista"
        Me.Tag = ""
        Me.Text = "Respositories & Windows Explorer"
        Me.Theme = resources.GetString("$this.Theme")
        Me.VirtualMnu.ResumeLayout(False)
        Me.NppComputer.ResumeLayout(False)
        Me.cmnuFileOptions.ResumeLayout(False)
        Me.NppRepositories.ResumeLayout(False)
        Me.pnlMyCompter.ResumeLayout(False)
        Me.pnlMyCompter.PerformLayout()
        Me.ThemeToolStrip1.ResumeLayout(False)
        Me.ThemeToolStrip1.PerformLayout()
        Me.pnlRepository.ResumeLayout(False)
        CType(Me.dgDocuments, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.VDOCUMENTSBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.DsTempList, System.ComponentModel.ISupportInitialize).EndInit()
        Me.Panel1.ResumeLayout(False)
        Me.Panel1.PerformLayout()
        Me.GroupBox1.ResumeLayout(False)
        Me.GroupBox1.PerformLayout()
        Me.GroupBox3.ResumeLayout(False)
        CType(Me.DGCOMMENTS, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.TBLDOCCOMMENTBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
        Me.GroupBox2.ResumeLayout(False)
        Me.cmsCkeckin.ResumeLayout(False)
        CType(Me.TBLDOCCATBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.TBLDOCSUBCATBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.BindingSource1, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)

    End Sub
#End Region
#Region "Funciones Publicas y Privadas"
    Private Sub SetGroups(ByVal column As Integer)
        ' Remove the current groups.
        lstvMyComputer.Groups.Clear()

        ' Retrieve the hash table corresponding to the column.
        Dim groups As Hashtable = CType(groupTables(column), Hashtable)

        ' Copy the groups for the column to an array.
        Dim groupsArray(groups.Count - 1) As ListViewGroup
        groups.Values.CopyTo(groupsArray, 0)

        ' Sort the groups and add them to myListView.
        Array.Sort(groupsArray, New ListViewGroupSorter(lstvMyComputer.Sorting))
        lstvMyComputer.Groups.AddRange(groupsArray)

        ' Iterate through the items in myListView, assigning each 
        ' one to the appropriate group.
        Dim item As ListViewItem
        For Each item In lstvMyComputer.Items
            ' Retrieve the subitem text corresponding to the column.
            Dim subItemText As String = item.SubItems(column).Text

            ' For the Title column, use only the first letter.
            If column = 0 Then
                subItemText = subItemText.Substring(0, 1)
            End If

            ' Assign the item to the matching group.
            item.Group = CType(groups(subItemText), ListViewGroup)
        Next item
    End Sub
    'CreateGroupsTable
    Private Function CreateGroupsTable(ByVal column As Integer) As Hashtable
        ' Create a Hashtable object.
        Dim groups As New Hashtable()

        ' Iterate through the items in myListView.
        Dim item As ListViewItem
        For Each item In lstvMyComputer.Items
            ' Retrieve the text value for the column.
            If column = 5 Then
                column -= 1
            End If
            Dim subItemText As String = item.SubItems(column).Text

            ' Use the initial letter instead if it is the first column.
            If column = 0 Then
                subItemText = subItemText.Substring(0, 1)
            End If

            ' If the groups table does not already contain a group
            ' for the subItemText value, add a new group using the 
            ' subItemText value for the group header and Hashtable key.
            If Not groups.Contains(subItemText) Then
                groups.Add(subItemText, New ListViewGroup(subItemText, _
                    HorizontalAlignment.Left))
            End If
        Next item

        ' Return the Hashtable object.
        Return groups
    End Function
    Function AddFileToTempList() As Boolean
        Try


            Dim ds As DataRow
            Dim i As Integer
            Dim dso As DSOFile.OleDocumentProperties
            Dim filepath As String
            Dim fileauthor As String = ""
            Dim filesubj As String = ""
            Dim filekey As String = ""
            Dim FileCat As String = ""
            Dim FileVersion As String = ""
            Dim VAR_FILETYPE As String
            Dim pdfFileinf As pdflib.ClsPDF
            If IsNothing(TblFileTemp) = True Then
                TblFileTemp = New DsTempList.TempListDataTable
            End If
            Dim fileinf As IO.FileInfo
            For i = 0 To Me.lstvMyComputer.SelectedItems.Count - 1
                ds = TblFileTemp.NewRow
                filepath = lstvMyComputer.SelectedItems.Item(i).SubItems(4).Text
                fileinf = New IO.FileInfo(filepath)
                VAR_FILETYPE = ""
                If fileinf.Extension.ToUpper <> ".PDF" Then
                    dso = New DSOFile.OleDocumentProperties
                    dso.Open(filepath, True, DSOFile.dsoFileOpenOptions.dsoOptionOpenReadOnlyIfNoWriteAccess)
                    Try
                        If dso.OleDocumentType = Nothing Then
                            VAR_FILETYPE = dso.ProgID
                        Else
                            VAR_FILETYPE = dso.OleDocumentType.ToString
                        End If
                        fileauthor = dso.SummaryProperties.Author
                        filesubj = dso.SummaryProperties.Subject
                        filekey = dso.SummaryProperties.Keywords
                        FileCat = dso.SummaryProperties.Category
                        FileVersion = dso.SummaryProperties.Version
                    Catch ex As Exception
                        Err.Clear()
                    End Try
                    dso.Close()
                    dso = Nothing
                Else
                    pdfFileinf = New pdflib.ClsPDF(filepath)
                    fileauthor = pdfFileinf.DocumentInformation.Author
                    filesubj = pdfFileinf.DocumentInformation.Subject
                    filekey = pdfFileinf.DocumentInformation.Keywords
                    FileCat = "Acrobat PDF"
                    VAR_FILETYPE = "Acrobat Document"
                    FileVersion = 1
                    pdfFileinf.Close()
                End If
                ''  ds("DOC_ID") = ""
                ds("DOC_CAT_ID") = 1
                ds("DOC_SUB_CAT_ID") = 1
                'Dim fs As FileStream = New FileStream(filepath, FileMode.Open)
                'Dim img As Byte() = New Byte(fs.Length) {}
                'fs.Read(img, 0, fs.Length)
                'fs.Close()
                ds("DOC") = MakeImage(filepath)
                ds("DOC_TYPE") = VAR_FILETYPE
                ds("DOC_DATE") = fileinf.LastWriteTime
                ds("DOC_VERSION") = 0
                ds("DOC_NAME") = Mid(fileinf.Name, 1, fileinf.Name.IndexOf("."))
                ds("DOC_EXT") = fileinf.Extension
                ds("DOC_AUTHOR") = fileauthor
                ds("DOC_SUBJECT") = filesubj
                ds("DOC_KEYWORDS") = filekey
                ds("DOC_TEXT") = ""
                ds("DOC_USERID") = FrmMain.UserAccoutnID
                ds("DOC_INUSE") = False
                ds("DOC_PATH") = fileinf.FullName
                TblFileTemp.Rows.Add(ds)
            Next
            MessageBox.Show("Files Sucessfully Add To Temporary List", "Virtual-Desk", MessageBoxButtons.OK, MessageBoxIcon.Information)
            Return True
        Catch ex As Exception
            MessageBox.Show(ex.ToString, "Virtual-Desk", MessageBoxButtons.OK, MessageBoxIcon.Error)
            Err.Clear()
        End Try
    End Function
    Function BindTreeView() As Boolean
        TbL_DOC_CATTableAdapter1.Fill(Me.DsTempList.TBL_DOC_CAT)
        Dim dtCat As New DataTable
        Dim dtSubCat As DataTable
        dtCat = TbL_DOC_CATTableAdapter1.GetData()
        Dim itmNodeRoot, itmNodeChild As TreeNode
        Dim itmNodeRootCount, itmNodeChildCount As Integer
        TreeViewRepository.Nodes.Clear()

        For itmNodeRootCount = 0 To dtCat.Rows.Count - 1

            itmNodeRoot = New TreeNode
            itmNodeRoot.Text = dtCat.Rows(itmNodeRootCount).Item("DOC_CAT_TYPE").ToString
            itmNodeRoot.Tag = "P-" & dtCat.Rows(itmNodeRootCount).Item("DOC_CAT_ID").ToString
            dtSubCat = New DataTable
            TbL_DOC_SUB_CATTableAdapter1.FillByCATEGOTY_ID(Me.DsTempList.TBL_DOC_SUB_CAT, dtCat.Rows(itmNodeRootCount).Item("DOC_CAT_ID").ToString)
            dtSubCat = TbL_DOC_SUB_CATTableAdapter1.GetDataByCATEGOTY_ID(dtCat.Rows(itmNodeRootCount).Item("DOC_CAT_ID").ToString)
            ''   If dtCat.Rows(itmNodeRootCount).Item("DOC_CAT_TYPE").ToString.Trim <> "" Then
            Me.TreeViewRepository.Nodes.Add(itmNodeRoot)
            For itmNodeChildCount = 0 To dtSubCat.Rows.Count - 1
                itmNodeChild = New TreeNode
                itmNodeChild.Text = dtSubCat.Rows(itmNodeChildCount).Item("DOC_SUB_CAT_TYPE").ToString
                itmNodeChild.Tag = "C-" & dtSubCat.Rows(itmNodeChildCount).Item("DOC_SUB_CAT_ID").ToString
                TreeViewRepository.Nodes(itmNodeRootCount).Nodes.Add(itmNodeChild)
            Next
            '' End If
        Next
        FindInTempWork(Application.StartupPath & "\TempWork")
        Return True
    End Function
    Public Sub MakeFile(ByVal img() As Byte, ByVal FileFullPath As String)
        Dim K As Long
        K = UBound(img)
        Dim fs As New FileStream _
         (FileFullPath, FileMode.OpenOrCreate, _
          FileAccess.Write)
        fs.Write(img, 0, K)
        fs.Close()
        fs = Nothing
    End Sub
    Public Function MakeImage(ByVal FileFullPath As String) As Byte()
        Try
            Dim fs As New FileStream _
          (FileFullPath, FileMode.OpenOrCreate, _
           FileAccess.Read)
            Dim MyData(fs.Length) As Byte
            fs.Read(MyData, 0, fs.Length)
            fs.Close()
            Return MyData
        Catch ex As Exception
            MessageBox.Show(ex.ToString, "Virtual Desk", MessageBoxButtons.OK, MessageBoxIcon.Error)
            Err.Clear()
        End Try
    End Function
    Function LoadDocument(ByVal doc_id As Integer, ByVal TempFolder As String, ByVal GetLastVer As Boolean, ByVal SaveinotherLocation As Boolean) As Boolean
        ''Dim CDATA As New Data
        ''CDATA.Rs_Data("SELECT * FROM TBL_DOC WHERE DOC_ID=" & doc_id)

        'Dim STM As ADODB.Stream
        'STM = New ADODB.Stream
        If Directory.Exists(Application.StartupPath & "/" & TempFolder & "/") = False Then
            Directory.CreateDirectory(Application.StartupPath & "/" & TempFolder & "/")
        End If
        'If SaveinotherLocation = False Then

        'End If
        Dim filename As String
        Dim vDocAptt As New VirtualDesk.DsTempListTableAdapters.TBL_DOCTableAdapter
        ''vDocAptt.FillByDOC_ID(Me.DsTempList.V_DOCUMENTS, "")
        Dim dstable As New DataTable
        dstable = vDocAptt.GetDataByDOC_ID(doc_id)
        If GetLastVer = False And SaveinotherLocation = False Then
            If dstable.Rows(0).Item("DOC_INUSE") = "True" Then
                MessageBox.Show("File Already in Use. Try Again Later.", "Virtual Desk", MessageBoxButtons.OK, MessageBoxIcon.Asterisk)
                Exit Function
            End If
        End If
        If SaveinotherLocation = False Then
            ''dstable.Rows(0).Item("DOC_NAME")
            filename = dstable.Rows(0).Item("DOC_ID") & dstable.Rows(0).Item("DOC_EXT")
            If dstable.Rows(0).Item("DOC_EXT").ToString.ToUpper = ".DOC" Or _
            dstable.Rows(0).Item("DOC_EXT").ToString.ToUpper = ".PPT" Or _
            dstable.Rows(0).Item("DOC_EXT").ToString.ToUpper = ".XLS" _
              Or dstable.Rows(0).Item("DOC_EXT").ToString.ToUpper = ".CSV" Then
                MakeFile(dstable.Rows(0).Item("DOC"), Application.StartupPath & "\" & TempFolder & "\" & filename)
                If File.Exists(Application.StartupPath & "\" & TempFolder & "\" & filename) = True Then
                    dstable.Rows(0).Item("DOC_INUSE") = True
                    Me.DsTempList.TBL_DOC.Merge(dstable)
                    vDocAptt.Update(dstable)
                    ''MakeOpenXml
                    Dim PROC As New ProcessStartInfo
                    PROC.UseShellExecute = True
                    PROC.WindowStyle = ProcessWindowStyle.Normal
                    PROC.WorkingDirectory = Application.StartupPath & "\" & TempFolder
                    PROC.FileName = Application.StartupPath & "\" & TempFolder & "\" & filename
                    Dim FilrProc As New Process
                    FilrProc.StartInfo = PROC
                    Try
                        FilrProc.Start()
                    Catch ex As Exception
                        MessageBox.Show("Error Ocurre When Try To Load File. Please Check File Type Association.", "Virtual Desk", MessageBoxButtons.OK, MessageBoxIcon.Error)
                        Err.Clear()
                        Exit Function
                    End Try
                End If
            Else
                MakeFile(dstable.Rows(0).Item("DOC"), Application.StartupPath & "\" & TempFolder & "\" & filename)
                If File.Exists(Application.StartupPath & "\" & TempFolder & "\" & filename) = True Then
                    If TempFolder = "TempWork" Then
                        dstable.Rows(0).Item("DOC_INUSE") = True
                    End If
                    Me.DsTempList.TBL_DOC.Merge(dstable)
                    vDocAptt.Update(dstable)
                    Dim PROC1 As New ProcessStartInfo
                    PROC1.UseShellExecute = True
                    PROC1.WindowStyle = ProcessWindowStyle.Normal
                    PROC1.WorkingDirectory = Application.StartupPath & "\" & TempFolder
                    PROC1.FileName = Application.StartupPath & "\" & TempFolder & "\" & filename
                    Dim FilrProc1 As New Process
                    FilrProc1.StartInfo = PROC1
                    Try
                        FilrProc1.Start()
                    Catch ex As Exception
                        MessageBox.Show("Error Ocurre When Try To Load File. Please Check File Type Association.", "Virtual Desk", MessageBoxButtons.OK, MessageBoxIcon.Error)
                        Err.Clear()
                        Exit Function
                    End Try
                    '' System.Diagnostics.Process.Start(PROC)
                Else
                    MessageBox.Show("File Not Exist", "VIRTUAL DESK", MessageBoxButtons.OK)
                End If
            End If
        End If
        If SaveinotherLocation = True Then
            Dim savediag As New FolderBrowserDialog
            savediag.RootFolder = Environment.SpecialFolder.MyComputer
            savediag.ShowDialog()
            If savediag.SelectedPath <> "" Then
                filename = dstable.Rows(0).Item("DOC_NAME") & dstable.Rows(0).Item("DOC_EXT")

                MakeFile(dstable.Rows(0).Item("DOC"), savediag.SelectedPath & "\" & filename)

                'Dim finf As New FileInfo(Application.StartupPath & "\" & TempFolder & "\" & filename)
                'If finf.Extension = ".DOCX" Then
                '    MakeOpenXml(Application.StartupPath & "\" & TempFolder & "\" & filename)
                'Else

                'End If

                'With STM
                '    .Open()
                '    .Type = ADODB.StreamTypeEnum.adTypeBinary
                '    .Write(dstable.Rows(0).Item("DOC"))
                '    .SaveToFile(savediag.SelectedPath & "\" & filename, ADODB.SaveOptionsEnum.adSaveCreateOverWrite)
                'End With
            End If

        End If
        If TempFolder = "TempWork" Then
            FindInTempWork(Application.StartupPath & "/" & TempFolder & "/")
        End If
        Return True
    End Function
    Function FindInTempWork(ByVal path As String) As Boolean
        Dim inDir As New DirectoryInfo(path)
        Dim tblGetFileInf As DsTempListTableAdapters.V_DOCUMENTSTableAdapter
        Dim dtable As DataTable
        Dim nodeToAdd As Integer
        Dim Files As New ArrayList(inDir.GetFiles())
        Dim file As FileInfo
        Dim ITM As TreeNode
        If Me.TreeViewRepository.Nodes(Me.TreeViewRepository.Nodes.Count - 1).Text = "Working Files".ToUpper Then
            Me.TreeViewRepository.Nodes.RemoveAt(Me.TreeViewRepository.Nodes.Count - 1)
        End If
        If Files.Count > 0 Then
            ITM = New TreeNode
            ITM.NodeFont = New Font("Microsoft Sans Serif", 8, FontStyle.Bold)
            ITM.ForeColor = Color.Red
            ITM.Text = "Working Files".ToUpper
            ITM.Tag = 0
            Me.TreeViewRepository.Nodes.Add(ITM)
            nodeToAdd = Me.TreeViewRepository.Nodes.Count

            For Each file In Files
                If file.Extension.ToUpper <> ".TMP" Then
                    tblGetFileInf = New DsTempListTableAdapters.V_DOCUMENTSTableAdapter
                    dtable = New DataTable
                    If IsNumeric(Mid(file.Name, 1, file.Name.IndexOf("."))) = True Then
                        dtable = tblGetFileInf.GetDataByDOC_ID(Mid(file.Name, 1, file.Name.IndexOf(".")))
                        If dtable.HasErrors = False Then
                            If dtable.Rows.Count >= 0 Then
                                ITM = New TreeNode
                                ITM.ForeColor = Color.Red
                                ITM.ImageIndex = 3
                                ITM.SelectedImageIndex = 3
                                ITM.Text = dtable.Rows(0).Item("DOC_NAME").ToString.ToUpper
                                ITM.Tag = dtable.Rows(0).Item("DOC_ID").ToString.ToUpper
                                Me.TreeViewRepository.Nodes(nodeToAdd - 1).Nodes.Add(ITM)
                            End If
                            ''MsgBox(dtable.Rows(0).Item("DOC_NAME"))
                        End If
                    End If
                End If
            Next
        End If
        TreeViewRepository.ExpandAll()
    End Function
    Function FileWorkDelete() As Boolean
        If IsNumeric(TreeViewRepository.SelectedNode.Tag) = True Then
            If TreeViewRepository.SelectedNode.Tag <= 0 Then
                Exit Function
            End If
            Dim tblGetFileInf As DsTempListTableAdapters.TBL_DOCTableAdapter
            Dim dtable As DataTable
            tblGetFileInf = New DsTempListTableAdapters.TBL_DOCTableAdapter
            dtable = New DataTable
            dtable = tblGetFileInf.GetDataByDOC_ID(TreeViewRepository.SelectedNode.Tag)
            If dtable.HasErrors = False Then
                
                If File.Exists(Application.StartupPath & "\TempWork\" & dtable.Rows(0).Item("DOC_ID") & dtable.Rows(0).Item("DOC_EXT")) = True Then
                    File.Delete(Application.StartupPath & "\TempWork\" & dtable.Rows(0).Item("DOC_ID") & dtable.Rows(0).Item("DOC_EXT"))
                    dtable.Rows(0).Item("DOC_INUSE") = False
                    Me.DsTempList.TBL_DOC.Merge(dtable)
                    tblGetFileInf.Update(dtable)
                    MessageBox.Show("Cancel Editing Sucessfully Done", "Virtual Desk", MessageBoxButtons.OK, MessageBoxIcon.Information)
                    Me.FindInTempWork(Application.StartupPath & "\TempWork\")
                End If
            End If
        End If
    End Function
    
    Public Sub SaveDocInf()

    End Sub
    Function LoadToRepository() As Boolean
        If IsNumeric(TreeViewRepository.SelectedNode.Tag) = True Then
            If TreeViewRepository.SelectedNode.Tag <= 0 Then
                Exit Function
            End If
            Dim fInf As FileInfo
            'Dim img As Byte()
            'Dim fs As FileStream
            Dim tblGetFileInf As DsTempListTableAdapters.TBL_DOCTableAdapter
            Dim dtable As DataTable

            tblGetFileInf = New DsTempListTableAdapters.TBL_DOCTableAdapter

            dtable = New DataTable
            dtable = tblGetFileInf.GetDataByDOC_ID(CInt(TreeViewRepository.SelectedNode.Tag))

            Dim dr As DataRow
            Dim i As Integer
            If MessageBox.Show("Do You Want Create Version To This Document?", "Virtual Desk", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
                dtable.Rows(0).Item("DOC_INUSE") = False
                Me.DsTempList.TBL_DOC.Merge(dtable)
                tblGetFileInf.Update(dtable)
                dr = dtable.NewRow

                For i = 0 To dtable.Columns.Count - 1
                    If i > 0 Then
                        dr(i) = dtable.Rows(0).Item(i)
                    End If
                Next
                'fs = New FileStream(Application.StartupPath & "\TempWork\" & dtable.Rows(0).Item("DOC_ID") & dtable.Rows(0).Item("DOC_EXT"), FileMode.Open)
                'img = New Byte(fs.Length) {}
                'fs.Read(img, 0, fs.Length)
                'fs.Close()


                dr("DOC") = MakeImage(Application.StartupPath & "\TempWork\" & dtable.Rows(0).Item("DOC_ID") & dtable.Rows(0).Item("DOC_EXT"))
                dr("DOC_VERSION") += 1
                dr("DOC_INUSE") = False
                fInf = New FileInfo(Application.StartupPath & "\TempWork\" & dtable.Rows(0).Item("DOC_ID") & dtable.Rows(0).Item("DOC_EXT"))
                dr("DOC_DATE") = fInf.LastWriteTime
                dtable.Rows.Add(dr)
                Me.DsTempList.TBL_DOC.Merge(dtable)
                tblGetFileInf.Update(dtable)
            Else
                'fs = New FileStream(Application.StartupPath & "\TempWork\" & dtable.Rows(0).Item("DOC_ID") & dtable.Rows(0).Item("DOC_EXT"), FileMode.Open)
                'img = New Byte(fs.Length) {}
                'fs.Read(img, 0, fs.Length)
                'fs.Close()
                dtable.Rows(0).Item("DOC") = MakeImage(Application.StartupPath & "\TempWork\" & dtable.Rows(0).Item("DOC_ID") & dtable.Rows(0).Item("DOC_EXT"))
                fInf = New FileInfo(Application.StartupPath & "\TempWork\" & dtable.Rows(0).Item("DOC_ID") & dtable.Rows(0).Item("DOC_EXT"))
                dtable.Rows(0).Item("DOC_DATE") = fInf.LastWriteTime
                dtable.Rows(0).Item("DOC_INUSE") = False
                Me.DsTempList.TBL_DOC.Merge(dtable)
                tblGetFileInf.Update(dtable)
            End If
            If File.Exists(Application.StartupPath & "\TempWork\" & dtable.Rows(0).Item("DOC_ID") & dtable.Rows(0).Item("DOC_EXT")) = True Then
                File.Delete(Application.StartupPath & "\TempWork\" & dtable.Rows(0).Item("DOC_ID") & dtable.Rows(0).Item("DOC_EXT"))
                MessageBox.Show("Document With Version Editing Sucessfully Done", "Virtual Desk", MessageBoxButtons.OK, MessageBoxIcon.Information)
                Me.FindInTempWork(Application.StartupPath & "\TempWork\")
            End If
        End If
    End Function
#End Region

    Private Sub Documents_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated
        BindTreeView()
        Me.TreeViewRepository.ExpandAll()
        Dim DATABLE As New DsTempListTableAdapters.TBL_DOC_COMMENTTableAdapter
        Dim DSCM As New DsTempList.TBL_DOC_COMMENTDataTable
        If Me.dgDocuments.Rows.Count > 0 Then
            If IsNumeric(Me.dgDocuments.CurrentRow.Cells(0).Value) = True Then
                Me.TBL_DOC_COMMENTTableAdapter.FillByCOMMENT_DOC_ID(Me.DsTempList.TBL_DOC_COMMENT, Me.dgDocuments.CurrentRow.Cells(0).Value)
            End If
        End If

    End Sub

    Private Sub Documents_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.GotFocus
        If IsNothing(VDOCUMENTSBindingSource) = False Then
            VDOCUMENTSBindingSource.Filter = Nothing
        End If

    

        Dim DATABLE As New DsTempListTableAdapters.TBL_DOC_COMMENTTableAdapter
        Dim DSCM As New DsTempList.TBL_DOC_COMMENTDataTable
        If Me.dgDocuments.Rows.Count > 0 Then
            If IsNumeric(Me.dgDocuments.CurrentRow.Cells(0).Value) = True Then
                Me.TBL_DOC_COMMENTTableAdapter.FillByCOMMENT_DOC_ID(Me.DsTempList.TBL_DOC_COMMENT, Me.dgDocuments.CurrentRow.Cells(0).Value)
            End If
        End If
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'DsTempList.TBL_DOC_COMMENT' table. You can move, or remove it, as needed.
        'TODO: This line of code loads data into the 'DsTempList.V_DOCUMENTS' table. You can move, or remove it, as needed.
        ''   Me.V_DOCUMENTSTableAdapter.Fill(Me.DsTempList.V_DOCUMENTS)
        'TODO: This line of code loads data into the 'DsTempList.TBL_DOC' table. You can move, or remove it, as needed.
        BindTreeView()
        Me.TreeViewRepository.ExpandAll()


    End Sub

    Private Sub lstvMyComputer_ColumnClick(ByVal sender As Object, ByVal e As System.Windows.Forms.ColumnClickEventArgs) Handles lstvMyComputer.ColumnClick

      


        If lstvMyComputer.View <> View.Details Then
            Debug.WriteLine("Info: The ColumnClick sort code only works if .View=View.Details.")
            Return
        End If
       
        If column <> e.Column Then
            groupTables = New Hashtable(5) {}

            For column = 0 To 6 - 1
                ' Create a hash table containing all the groups 
                ' needed for a single column.
                groupTables(column) = CreateGroupsTable(column)
            Next column
            column = e.Column
            SetGroups(e.Column)
        End If
        ''  ***********SORTING OPTIONS*************************
        If oSorter Is Nothing Then
            oSorter = New ListViewItemSorterClass()
            lstvMyComputer.ListViewItemSorter = Nothing

            ' Make sure no other ItemSorter (for example set by the listview Sorting property) disturbes.
        End If
        oSorter.CultureInfoName = ""        ' Override locale system setting.
        oSorter.Column = e.Column
        oSorter.SortOrder = SortOrder.Ascending
        oSorter.ColumnType = oSorter.DetectColumnType(lstvMyComputer, e.Column)   ' Info: Optional - but preferred in most situations. Remove it to always use ColumnType=ListViewColumnType.Text. Replace it with other logic if you have a "special case".
        oSorter.CompareMethod = Microsoft.VisualBasic.CompareMethod.Binary       ' Specify case sensitivity (used if ColumnType=ListViewColumnType.Text).
        oSorter.CompareFromLeftToDiff = True

        If lstvMyComputer.Sorting = SortOrder.Descending OrElse _
                    isRunningXPOrLater And e.Column <> groupColumn Then
            lstvMyComputer.Sorting = SortOrder.Ascending
        Else
            lstvMyComputer.Sorting = SortOrder.Descending
        End If
        groupColumn = e.Column

        ' Set the groups to those created for the clicked column.
        If isRunningXPOrLater Then
            SetGroups(e.Column)
        End If
        Select Case lstvMyComputer.View
            Case View.Details
                Me.myDtView.setView(DirectoryTreeview.DirectoryTreeview.ViewType.Details)
            Case View.LargeIcon
                Me.myDtView.setView(DirectoryTreeview.DirectoryTreeview.ViewType.LargeIcons)
            Case View.List
                Me.myDtView.setView(DirectoryTreeview.DirectoryTreeview.ViewType.List)
            Case View.SmallIcon
                Me.myDtView.setView(DirectoryTreeview.DirectoryTreeview.ViewType.SmallIcons)
            Case View.Tile
                Me.myDtView.setView(DirectoryTreeview.DirectoryTreeview.ViewType.Tile)
        End Select
    End Sub

    Private Sub lstvMyComputer_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstvMyComputer.DoubleClick
        Dim i As Integer
        For i = 0 To lstvMyComputer.SelectedItems.Count - 1
            Dim str As String = lstvMyComputer.SelectedItems.Item(i).SubItems(4).Text
            If str.Trim <> "" Then
                If lstvMyComputer.SelectedItems.Item(i).SubItems(2).Text <> "File Folder" Or lstvMyComputer.SelectedItems.Item(i).SubItems(2).Text <> "System Folder" Then
                    System.Diagnostics.Process.Start(str)
                End If

            End If
        Next
    End Sub

    Private Sub lstvMyComputer_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstvMyComputer.SelectedIndexChanged

    End Sub

    Private Sub VirtualMnu_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles VirtualMnu.SelectedIndexChanged
        ''   MsgBox(VirtualMnu.SelectedIndex)
        If VirtualMnu.SelectedIndex = 1 Then
            Me.pnlMyCompter.Visible = True
            Me.pnlRepository.Visible = False
            groupTables = New Hashtable(lstvMyComputer.Columns.Count) {}
            Dim column As Integer
            For column = 0 To lstvMyComputer.Columns.Count - 1
                ' Create a hash table containing all the groups 
                ' needed for a single column.
                groupTables(column) = CreateGroupsTable(column)
            Next column
            SetGroups(2)
        Else
            BindTreeView()
            Me.TreeViewRepository.ExpandAll()
            Me.pnlRepository.Visible = True
            Me.pnlMyCompter.Visible = False
        End If
    End Sub

    Private Sub tsMnuSelectedFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub AddSelectFileToListToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddSelectFileToListToolStripMenuItem.Click
        AddFileToTempList()
    End Sub

    Private Sub EditListToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EditListToolStripMenuItem.Click
        Dim frmtmp As New TempList
        frmtmp.MdiParent = FrmMain
        If IsNothing(TblFileTemp) = False Then
            frmtmp.Show()
        Else
            MessageBox.Show("No temporary list available", "VIRTUAL DESK", MessageBoxButtons.OK, MessageBoxIcon.Information)
        End If
    End Sub

    Private Sub ClearListToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ClearListToolStripMenuItem.Click
        TblFileTemp.Rows.Clear()
        TblFileTemp = Nothing
    End Sub

    Private Sub AddToTemporaryListToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddToTemporaryListToolStripMenuItem.Click
        AddFileToTempList()
    End Sub

    Private Sub GoToTemporaryListToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GoToTemporaryListToolStripMenuItem.Click
        Dim frmtmp As New TempList
        frmtmp.MdiParent = FrmMain
        If IsNothing(TblFileTemp) = False Then
            frmtmp.Show()
        Else
            MessageBox.Show("No temporary list available", "VIRTUAL DESK", MessageBoxButtons.OK, MessageBoxIcon.Information)

        End If

    End Sub

    Private Sub DetailToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DetailToolStripMenuItem.Click
        lstvMyComputer.View = View.Details
    End Sub

    Private Sub ListToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListToolStripMenuItem.Click
        lstvMyComputer.View = View.List
    End Sub

    Private Sub SmallIconsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SmallIconsToolStripMenuItem.Click
        lstvMyComputer.View = View.SmallIcon
    End Sub

    Private Sub LargeIconsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LargeIconsToolStripMenuItem.Click
        lstvMyComputer.View = View.LargeIcon
    End Sub

    Private Sub TitleToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TitleToolStripMenuItem.Click
        lstvMyComputer.View = View.Tile
    End Sub

    Private Sub TreeViewRepository_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles TreeViewRepository.AfterSelect
        ''Try
        If IsNothing(VDOCUMENTSBindingSource) = False Then
            VDOCUMENTSBindingSource.Filter = Nothing
        End If
        If IsNumeric(e.Node.Tag) = False Then
            Dim STR() As String = e.Node.Tag.ToString.Split("-")
            If STR(0) = "P" Then
                Me.V_DOCUMENTSTableAdapter.FillByDOC_CAT_ID(Me.DsTempList.V_DOCUMENTS, STR(1))
                Me.dgDocuments.DataSource = VDOCUMENTSBindingSource
            End If
            If STR(0) = "C" Then
                Me.V_DOCUMENTSTableAdapter.FillByDOC_SUB_CAT_ID(Me.DsTempList.V_DOCUMENTS, STR(1))
                '' Me.TBL_DOC_COMMENTTableAdapter.FillByCOMMENT_DOC_ID(Me.DsTempList.TBL_DOC_COMMENT, STR(1))
                Me.dgDocuments.DataSource = VDOCUMENTSBindingSource
            End If
            Me.TreeViewRepository.ContextMenuStrip = Nothing

        Else
            Me.V_DOCUMENTSTableAdapter.FillByDOC_SUB_CAT_ID(Me.DsTempList.V_DOCUMENTS, 0)
            If e.Node.Tag > 0 Then
                Me.TreeViewRepository.ContextMenuStrip = cmsCkeckin
                Me.dgDocuments.DataSource = VDOCUMENTSBindingSource
            End If
        End If

        'Catch ex As Exception
        '    Err.Clear()
        'End Try

    End Sub



    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        ''Dim ss As New SearchFilesFolder
        ''SearchFilesFolder.SearchDirectory("C:\", "*.TXT")
    End Sub

    Private Sub btn_editDoc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_editDoc.Click
        If Me.dgDocuments.SelectedRows.Count > 0 Then
            LoadDocument(CInt(Me.dgDocuments.CurrentRow.Cells(0).Value), "TempWork", False, False)
        End If

    End Sub

    Private Sub btnViewDocument_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnViewDocument.Click
        If Me.dgDocuments.SelectedRows.Count > 0 Then
            LoadDocument(CInt(Me.dgDocuments.CurrentRow.Cells(0).Value), "TempView", False, False)
        End If
    End Sub

 
    Private Sub TreeViewRepository_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles TreeViewRepository.DoubleClick
        If IsNumeric(TreeViewRepository.SelectedNode.Tag) = True Then
            If TreeViewRepository.SelectedNode.Tag <= 0 Then
                Exit Sub
            End If
            Dim tblGetFileInf As DsTempListTableAdapters.V_DOCUMENTSTableAdapter
            Dim dtable As DataTable
            tblGetFileInf = New DsTempListTableAdapters.V_DOCUMENTSTableAdapter
            dtable = New DataTable
            dtable = tblGetFileInf.GetDataByDOC_ID(TreeViewRepository.SelectedNode.Tag)
            If dtable.HasErrors = False Then
                If File.Exists(Application.StartupPath & "\TempWork\" & dtable.Rows(0).Item("DOC_ID") & dtable.Rows(0).Item("DOC_EXT")) = True Then
                    Dim PROC As New ProcessStartInfo
                    PROC.UseShellExecute = True
                    PROC.WindowStyle = ProcessWindowStyle.Normal
                    PROC.WorkingDirectory = Application.StartupPath & "\TempWork\"
                    PROC.FileName = Application.StartupPath & "\TempWork\" & dtable.Rows(0).Item("DOC_ID") & dtable.Rows(0).Item("DOC_EXT")
                    Dim FilrProc As New Process
                    FilrProc.StartInfo = PROC
                    FilrProc.Start()
                End If
            End If
        End If

    End Sub

    Private Sub LoadToRepositoryMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoadToRepositoryMenuItem.Click
        LoadToRepository()
    End Sub

    Private Sub CancelEditingMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CancelEditingMenuItem.Click
        Me.FileWorkDelete()
    End Sub

    Private Sub GetLastMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GetLastMenuItem.Click
        If IsNumeric(TreeViewRepository.SelectedNode.Tag) = True Then
            If TreeViewRepository.SelectedNode.Tag <= 0 Then
                Exit Sub
            End If
            LoadDocument(CInt(TreeViewRepository.SelectedNode.Tag), "TempWork", True, False)
        End If
    End Sub

    Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label3.Click

    End Sub

    Private Sub ThemeButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ThemeButton3.Click
        Try
            If MessageBox.Show("Are You Want Delete Selected File?", "Virtual Desk", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
                Dim cdata As New Data
                cdata.DS_Read("DELETE TBL_DOC WHERE DOC_ID=" & Me.dgDocuments.CurrentRow.Cells(0).Value, "DSDELETE")
                If IsNumeric(Me.TreeViewRepository.SelectedNode.Tag) = False Then
                    Dim STR() As String = Me.TreeViewRepository.SelectedNode.Tag.ToString.Split("-")
                    If STR(0) = "P" Then
                        Me.V_DOCUMENTSTableAdapter.FillByDOC_CAT_ID(Me.DsTempList.V_DOCUMENTS, STR(1))
                        Me.dgDocuments.DataSource = VDOCUMENTSBindingSource
                    End If
                    If STR(0) = "C" Then
                        Me.V_DOCUMENTSTableAdapter.FillByDOC_SUB_CAT_ID(Me.DsTempList.V_DOCUMENTS, STR(1))
                        '' Me.TBL_DOC_COMMENTTableAdapter.FillByCOMMENT_DOC_ID(Me.DsTempList.TBL_DOC_COMMENT, STR(1))
                        Me.dgDocuments.DataSource = VDOCUMENTSBindingSource
                    End If
                    Me.TreeViewRepository.ContextMenuStrip = Nothing

                Else
                    Me.V_DOCUMENTSTableAdapter.FillByDOC_SUB_CAT_ID(Me.DsTempList.V_DOCUMENTS, 1)
                    If Me.TreeViewRepository.SelectedNode.Tag > 0 Then
                        Me.TreeViewRepository.ContextMenuStrip = cmsCkeckin
                    End If
                End If
                MessageBox.Show("Document Sucessfully Deleted", "Virutal Desk", MessageBoxButtons.OK, MessageBoxIcon.Information)
            End If
        Catch ex As Exception
            MessageBox.Show(ex.ToString)
            Err.Clear()
        End Try
    End Sub

    Private Sub btn_addComment_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_addComment.Click
        Dim frmComment As New FrmDocComments
        frmComment.DocumentID = Me.dgDocuments.CurrentRow.Cells(0).Value
        frmComment.EditCommet = False
        frmComment.CommentID = 0
        frmComment.StartPosition = FormStartPosition.CenterScreen
        frmComment.ShowDialog()
    End Sub

    Private Sub dgDocuments_CellClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgDocuments.CellClick

        If e.ColumnIndex >= 0 Then
            Dim i As Integer
            For i = 0 To dgDocuments.ColumnCount - 1
                dgDocuments.Columns(i).DefaultCellStyle.BackColor = Color.White
                dgDocuments.Columns(i).DefaultCellStyle.ForeColor = Color.Black
            Next
            Me.lblColumn.Text = "Find In: " & dgDocuments.Columns(e.ColumnIndex).HeaderText
            CurrentColumnIndex = e.ColumnIndex
            dgDocuments.Columns(e.ColumnIndex).DefaultCellStyle.BackColor = Color.FromArgb(131, 193, 237)
            dgDocuments.Columns(e.ColumnIndex).DefaultCellStyle.ForeColor = Color.Black
        End If
    End Sub

    Private Sub dgDocuments_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgDocuments.CellContentClick


    End Sub

    Private Sub dgDocuments_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles dgDocuments.Click
  
    End Sub

    Private Sub dgDocuments_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles dgDocuments.SelectionChanged
        Dim DATABLE As New DsTempListTableAdapters.TBL_DOC_COMMENTTableAdapter
        Dim DSCM As New DsTempList.TBL_DOC_COMMENTDataTable
        If Me.dgDocuments.Rows.Count > 0 Then
            If IsNumeric(Me.dgDocuments.CurrentRow.Cells(0).Value) = True Then
                Me.TBL_DOC_COMMENTTableAdapter.FillByCOMMENT_DOC_ID(Me.DsTempList.TBL_DOC_COMMENT, Me.dgDocuments.CurrentRow.Cells(0).Value)
            End If
        End If

    End Sub

    Private Sub DGCOMMENTS_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DGCOMMENTS.CellContentClick

    End Sub

    Private Sub DGCOMMENTS_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles DGCOMMENTS.DoubleClick
        Dim frmComment As New FrmDocComments
        frmComment.DocumentID = Me.dgDocuments.CurrentRow.Cells(0).Value
        frmComment.EditCommet = True
        frmComment.CommentID = Me.DGCOMMENTS.CurrentRow.Cells(0).Value
        frmComment.StartPosition = FormStartPosition.CenterScreen
        frmComment.ShowDialog()
    End Sub

    Private Sub btnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Application.Exit()

    End Sub

    Private Sub ThemeToolStrip1_ItemClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles ThemeToolStrip1.ItemClicked

    End Sub

    Private Sub btnCopy_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCopy.Click
        If Me.DGCOMMENTS.SelectedRows.Count > 0 Then
            If Me.LoadDocument(Me.dgDocuments.CurrentRow.Cells(0).Value, Nothing, False, True) = True Then
                MessageBox.Show("Document Sucessfully Created in Selected Location", "Virtual Desk", MessageBoxButtons.OK, MessageBoxIcon.Information)
            End If
        End If

    End Sub

    Private Sub btnDuplicate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDuplicate.Click
        Try
            Dim ds As DataRow
            Dim I As Integer
            Dim CLMNo As Integer
            Dim dtable As DataTable
            dtable = Me.TbL_DOCTableAdapter1.GetDataByDOC_ID(Me.dgDocuments.CurrentRow.Cells(0).Value)
            For I = 0 To dtable.Rows.Count - 1
                ds = dtable.NewRow
                For CLMNo = 0 To dtable.Columns.Count - 1
                    If CLMNo > 0 Then
                        If CLMNo = 6 Then
                            ds(CLMNo) = CInt(dtable.Rows(I).Item(CLMNo)) + 1
                        Else
                            ds(CLMNo) = dtable.Rows(I).Item(CLMNo)
                        End If
                    End If
                Next
                dtable.Rows.Add(ds)
            Next
            Me.TbL_DOCTableAdapter1.Update(dtable)
            Me.DsTempList.TBL_DOC.Merge(dtable)
            If IsNumeric(Me.TreeViewRepository.SelectedNode.Tag) = False Then
                Dim STR() As String = Me.TreeViewRepository.SelectedNode.Tag.ToString.Split("-")
                If STR(0) = "P" Then
                    Me.V_DOCUMENTSTableAdapter.FillByDOC_CAT_ID(Me.DsTempList.V_DOCUMENTS, STR(1))

                End If
                If STR(0) = "C" Then
                    Me.V_DOCUMENTSTableAdapter.FillByDOC_SUB_CAT_ID(Me.DsTempList.V_DOCUMENTS, STR(1))
                    '' Me.TBL_DOC_COMMENTTableAdapter.FillByCOMMENT_DOC_ID(Me.DsTempList.TBL_DOC_COMMENT, STR(1))

                End If
                Me.TreeViewRepository.ContextMenuStrip = Nothing

            Else
                Me.V_DOCUMENTSTableAdapter.FillByDOC_SUB_CAT_ID(Me.DsTempList.V_DOCUMENTS, 0)
                If Me.TreeViewRepository.SelectedNode.Tag > 0 Then
                    Me.TreeViewRepository.ContextMenuStrip = cmsCkeckin
                End If
            End If
            MessageBox.Show("Files Sucessfully Adding to Repositories", "Virtual-Desk", MessageBoxButtons.OK, MessageBoxIcon.Information)
        Catch ex As Exception
            MessageBox.Show(ex.ToString, "Virtual-Desk", MessageBoxButtons.OK, MessageBoxIcon.Error)
            Err.Clear()
        End Try
    End Sub

    Private Sub txtSearch_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtSearch.GotFocus
        Me.txtSearch.Text = ""
        Me.txtSearch.ForeColor = Color.Black
    End Sub

    Private Sub txtSearch_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtSearch.LostFocus
        If Me.txtSearch.Text.Trim = "" Then
            Me.txtSearch.Text = "Type Search Criteria"
            Me.txtSearch.ForeColor = Color.DarkGray
        End If
    End Sub
    Private Sub btn_EditDocInf_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_EditDocInf.Click
        Dim frmeditInf As New FrmDocInfEdit
        frmeditInf.DocID = Me.dgDocuments.CurrentRow.Cells(0).Value
        frmeditInf.MdiParent = FrmMain
        frmeditInf.StartPosition = FormStartPosition.CenterScreen
        frmeditInf.frmDocument = Me
        frmeditInf.Show()
    End Sub

    Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs)
        'Dim print1 As New PrintDoc2Pdf.pdfPrinter
        'With print1
        '    .FileName = ""
        '    .Print()

        'End With

    End Sub

    Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSearch.Click
        Try
            If txtSearch.Text.Trim = "" Then
                MessageBox.Show("Type Search Criteria Before Click Search Botton", "Virutal Desk", MessageBoxButtons.OK, MessageBoxIcon.Warning)
                Exit Sub
            End If
            Dim fieldToSearch As String = Me.dgDocuments.Columns(CurrentColumnIndex).DataPropertyName.ToString
            If CurrentColumnIndex = 0 Then
                VDOCUMENTSBindingSource.Filter = fieldToSearch & " = " & txtSearch.Text.Trim

            Else
                VDOCUMENTSBindingSource.Filter = fieldToSearch & " LIKE '%" & txtSearch.Text.Trim & "%'"
            End If
            Dim CDATA As New Data
            'CDATA.DS_Read(strsql, "DSFILGER")
            'Me.dgDocuments.DataSource = CDATA.DSdata
        Catch ex As Exception
            MessageBox.Show(ex.ToString, "Virutal Desk", MessageBoxButtons.OK, MessageBoxIcon.Warning)
            Err.Clear()
        End Try
    End Sub

    Private Sub btnClearFilter_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClearFilter.Click
        If IsNothing(VDOCUMENTSBindingSource) = False Then
            VDOCUMENTSBindingSource.Filter = Nothing
            Me.txtSearch.Text = ""
        End If
    End Sub

    Private Sub myDtView_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles myDtView.Click
      
    End Sub
    Private Sub myDtView_ExpTreeNodeSelected(ByVal SelPath As String, ByVal Item As DirectoryTreeview.CShItem) Handles myDtView.ExpTreeNodeSelected
        If lstvMyComputer.Columns.Count > 0 Then
            If lstvMyComputer.View <> View.Details Then
                Debug.WriteLine("Info: The ColumnClick sort code only works if .View=View.Details.")
                Return
            End If
            ' hash table for each column.
            groupTables = New Hashtable(lstvMyComputer.Columns.Count) {}
            Dim column As Integer
            For column = 0 To 6 - 1
                ' Create a hash table containing all the groups 
                ' needed for a single column.
                groupTables(column) = CreateGroupsTable(column)
            Next column
            SetGroups(2)
        End If
    End Sub

    Private Sub myDtView_InitialDirectoryChanged(ByVal newDirectory As DirectoryTreeview.DirectoryTreeview.InitialDir) Handles myDtView.InitialDirectoryChanged
       
    End Sub
End Class

Public Class ListViewGroupSorter
    Implements IComparer
    Private order As SortOrder
    Public Sub New(ByVal theOrder As SortOrder)
        order = theOrder
    End Sub
    Public Function Compare(ByVal x As Object, ByVal y As Object) As Integer _
     Implements IComparer.Compare
        Dim result As Integer = String.Compare( _
            CType(x, ListViewGroup).Header, _
            CType(y, ListViewGroup).Header)
        If order = SortOrder.Ascending Then
            Return result
        Else
            Return -result
        End If
    End Function 'Compare
End Class